diff options
author | Dave Airlie <airlied@redhat.com> | 2009-10-05 23:54:01 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-10-05 23:54:01 -0400 |
commit | b8c00ac5b50b54491657f8b6740db1df50149944 (patch) | |
tree | b4cfbc0dbb5ba063bcc933d7339504b80dc5c61c /drivers/gpu/drm/i915/intel_fb.c | |
parent | 068143d38804825d59d951a192cfadd2e22f457d (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_fb.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 3ee8db1fbcd0..2b0fe54cd92c 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -65,6 +65,7 @@ static struct fb_ops intelfb_ops = { | |||
65 | 65 | ||
66 | static struct drm_fb_helper_funcs intel_fb_helper_funcs = { | 66 | static struct drm_fb_helper_funcs intel_fb_helper_funcs = { |
67 | .gamma_set = intel_crtc_fb_gamma_set, | 67 | .gamma_set = intel_crtc_fb_gamma_set, |
68 | .gamma_get = intel_crtc_fb_gamma_get, | ||
68 | }; | 69 | }; |
69 | 70 | ||
70 | 71 | ||
@@ -124,6 +125,10 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
124 | struct device *device = &dev->pdev->dev; | 125 | struct device *device = &dev->pdev->dev; |
125 | int size, ret, mmio_bar = IS_I9XX(dev) ? 0 : 1; | 126 | int size, ret, mmio_bar = IS_I9XX(dev) ? 0 : 1; |
126 | 127 | ||
128 | /* we don't do packed 24bpp */ | ||
129 | if (surface_bpp == 24) | ||
130 | surface_bpp = 32; | ||
131 | |||
127 | mode_cmd.width = surface_width; | 132 | mode_cmd.width = surface_width; |
128 | mode_cmd.height = surface_height; | 133 | mode_cmd.height = surface_height; |
129 | 134 | ||
@@ -245,7 +250,7 @@ int intelfb_probe(struct drm_device *dev) | |||
245 | int ret; | 250 | int ret; |
246 | 251 | ||
247 | DRM_DEBUG("\n"); | 252 | DRM_DEBUG("\n"); |
248 | ret = drm_fb_helper_single_fb_probe(dev, intelfb_create); | 253 | ret = drm_fb_helper_single_fb_probe(dev, 32, intelfb_create); |
249 | return ret; | 254 | return ret; |
250 | } | 255 | } |
251 | EXPORT_SYMBOL(intelfb_probe); | 256 | EXPORT_SYMBOL(intelfb_probe); |