drm/radeon/kms: pick 8bpp console when 32MB or less VRAM
authorDave Airlie <airlied@redhat.com>
Wed, 18 Nov 2009 03:39:34 +0000 (13:39 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 2 Dec 2009 01:37:10 +0000 (11:37 +1000)
making the pinned console smaller gives X a bit more room to play with.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_fb.c

index b38c4c8e2c611f9d8f6d9276bc69d8f199e056c0..cb2f16a0b8ff065c76339f4d1f8ea81f05fcba34 100644 (file)
@@ -321,7 +321,14 @@ int radeon_parse_options(char *options)
 
 int radeonfb_probe(struct drm_device *dev)
 {
-       return drm_fb_helper_single_fb_probe(dev, 32, &radeonfb_create);
+       struct radeon_device *rdev = dev->dev_private;
+       int bpp_sel = 32;
+
+       /* select 8 bpp console on RN50 or 16MB cards */
+       if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32*1024*1024))
+               bpp_sel = 8;
+
+       return drm_fb_helper_single_fb_probe(dev, bpp_sel, &radeonfb_create);
 }
 
 int radeonfb_remove(struct drm_device *dev, struct drm_framebuffer *fb)