summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mgag200/mgag200_main.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-01-21 01:47:46 -0500
committerDave Airlie <airlied@redhat.com>2014-01-23 11:01:35 +1000
commit918be888d613e58938338b4b0c895de97579173d (patch)
treed81c238aaf85a9100b7d64eed836fc684089bb3d /drivers/gpu/drm/mgag200/mgag200_main.c
parentf5395ba35f2ae52eb5839f8046e4aeef6df7f357 (diff)
drm/mgag200: on cards with < 2MB VRAM default to 16-bit
This aligns with what the userspace -mga driver does in the same situation. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_main.c')
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c
index a1bfe7258364..26868e5c55b0 100644
--- a/drivers/gpu/drm/mgag200/mgag200_main.c
+++ b/drivers/gpu/drm/mgag200/mgag200_main.c
@@ -217,7 +217,10 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
drm_mode_config_init(dev);
dev->mode_config.funcs = (void *)&mga_mode_funcs;
- dev->mode_config.preferred_depth = 24;
+ if (IS_G200_SE(mdev) && mdev->mc.vram_size < (2048*1024))
+ dev->mode_config.preferred_depth = 16;
+ else
+ dev->mode_config.preferred_depth = 24;
dev->mode_config.prefer_shadow = 1;
r = mgag200_modeset_init(mdev);