drm: expand gamma_set

Expand the crtc_gamma_set function to accept a starting offset. The
reason for this is to eventually use this function for setcolreg from
drm_fb_helper.c. The fbdev colormap function can start at any offset in
the color map.

Signed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
James Simmons
2010-08-03 01:33:19 +01:00
committed by Dave Airlie
szülő 38fcbb674d
commit 7203425a94
7 fájl változott, egészen pontosan 16 új sor hozzáadva és 28 régi sor törölve

Fájl megtekintése

@@ -742,15 +742,13 @@ nv_crtc_gamma_load(struct drm_crtc *crtc)
}
static void
nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t size)
nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b, uint32_t start,
uint32_t size)
{
int end = (start + size > 256) ? 256 : start + size, i;
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
int i;
if (size != 256)
return;
for (i = 0; i < 256; i++) {
for (i = start; i < end; i++) {
nv_crtc->lut.r[i] = r[i];
nv_crtc->lut.g[i] = g[i];
nv_crtc->lut.b[i] = b[i];