diff options
author | James Simmons <jsimmons@infradead.org> | 2010-08-03 01:33:19 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-10 10:47:00 +1000 |
commit | 7203425a943eb3e189ba6b512827e0deb5f23872 (patch) | |
tree | e0fdc7ed583f6990bbffde67f4f45b1f11b5a39e /drivers/gpu/drm/i915/intel_display.c | |
parent | 38fcbb674d7cc37b38473a89e8045ee80364e4f9 (diff) | |
download | op-kernel-dev-7203425a943eb3e189ba6b512827e0deb5f23872.zip op-kernel-dev-7203425a943eb3e189ba6b512827e0deb5f23872.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ec8336a..6bb5ffc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4330,15 +4330,12 @@ void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, } static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, - u16 *blue, uint32_t size) + u16 *blue, uint32_t start, uint32_t size) { + int end = (start + size > 256) ? 256 : start + size, i; struct intel_crtc *intel_crtc = to_intel_crtc(crtc); - int i; - - if (size != 256) - return; - for (i = 0; i < 256; i++) { + for (i = start; i < end; i++) { intel_crtc->lut_r[i] = red[i] >> 8; intel_crtc->lut_g[i] = green[i] >> 8; intel_crtc->lut_b[i] = blue[i] >> 8; |