aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-10-05 23:54:01 -0400
committerDave Airlie <airlied@redhat.com>2009-10-05 23:54:01 -0400
commitb8c00ac5b50b54491657f8b6740db1df50149944 (patch)
treeb4cfbc0dbb5ba063bcc933d7339504b80dc5c61c /drivers/gpu/drm/i915/intel_display.c
parent068143d38804825d59d951a192cfadd2e22f457d (diff)
drm/fb: add more correct 8/16/24/32 bpp fb support.
The previous patches had some unwanted side effects, I've fixed the lack of 32bpp working, and fixed up 16bpp so it should also work. this also adds the interface to allow the driver to set a preferred console depth so for example low memory rn50 can set it to 8bpp. It also catches 24bpp on cards that can't do it and forces 32bpp. Tested on r100/r600/i945. 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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a840cb1bd36a..893903962e54 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2922,6 +2922,16 @@ void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
2922 intel_crtc->lut_b[regno] = blue >> 8; 2922 intel_crtc->lut_b[regno] = blue >> 8;
2923} 2923}
2924 2924
2925void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
2926 u16 *blue, int regno)
2927{
2928 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
2929
2930 *red = intel_crtc->lut_r[regno] << 8;
2931 *green = intel_crtc->lut_g[regno] << 8;
2932 *blue = intel_crtc->lut_b[regno] << 8;
2933}
2934
2925static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, 2935static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
2926 u16 *blue, uint32_t size) 2936 u16 *blue, uint32_t size)
2927{ 2937{