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>
This commit is contained in:
parent
b19c19afa8
commit
3df546be6b
|
@ -556,11 +556,21 @@ static struct drm_framebuffer *psb_user_framebuffer_create
|
||||||
static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
|
static void psbfb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
|
||||||
u16 blue, int regno)
|
u16 blue, int regno)
|
||||||
{
|
{
|
||||||
|
struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc);
|
||||||
|
|
||||||
|
intel_crtc->lut_r[regno] = red >> 8;
|
||||||
|
intel_crtc->lut_g[regno] = green >> 8;
|
||||||
|
intel_crtc->lut_b[regno] = blue >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red,
|
static void psbfb_gamma_get(struct drm_crtc *crtc, u16 *red,
|
||||||
u16 *green, u16 *blue, int regno)
|
u16 *green, u16 *blue, int regno)
|
||||||
{
|
{
|
||||||
|
struct psb_intel_crtc *intel_crtc = to_psb_intel_crtc(crtc);
|
||||||
|
|
||||||
|
*red = intel_crtc->lut_r[regno] << 8;
|
||||||
|
*green = intel_crtc->lut_g[regno] << 8;
|
||||||
|
*blue = intel_crtc->lut_b[regno] << 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int psbfb_probe(struct drm_fb_helper *helper,
|
static int psbfb_probe(struct drm_fb_helper *helper,
|
||||||
|
|
Reference in New Issue