diff options
author | Alan Cox <alan@linux.intel.com> | 2012-03-08 11:00:00 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-10 08:05:23 -0500 |
commit | 3df546be6b74c1e2633498104ba8879507fb06fd (patch) | |
tree | 5d5fd6b55240cf8c0f0b6f2bf85f3c1863b37a17 | |
parent | b19c19afa880105179b3c25e57b169c8fcda334c (diff) |
gma500: plug in more of the gamma functionality
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/gma500/framebuffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index c1c4dc174fa2..973822971e8e 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c | |||
@@ -556,11 +556,21 @@ static struct drm_framebuffer *psb_user_framebuffer_create | |||
556 | static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, | 556 | static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, |
557 | u16 blue, int regno) | 557 | u16 blue, int regno) |
558 | { | 558 | { |
559 | struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc); | ||
560 | |||
561 | intel_crtc->lut_r[regno] = red >> 8; | ||
562 | intel_crtc->lut_g[regno] = green >> 8; | ||
563 | intel_crtc->lut_b[regno] = blue >> 8; | ||
559 | } | 564 | } |
560 | 565 | ||
561 | static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red, | 566 | static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red, |
562 | u16 *green, u16 *blue, int regno) | 567 | u16 *green, u16 *blue, int regno) |
563 | { | 568 | { |
569 | struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc); | ||
570 | |||
571 | *red = intel_crtc->lut_r[regno] << 8; | ||
572 | *green = intel_crtc->lut_g[regno] << 8; | ||
573 | *blue = intel_crtc->lut_b[regno] << 8; | ||
564 | } | 574 | } |
565 | 575 | ||
566 | static int psbfb_probe(struct drm_fb_helper *helper, | 576 | static int psbfb_probe(struct drm_fb_helper *helper, |