aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-12-20 09:43:53 -0500
committerDave Airlie <airlied@redhat.com>2011-12-20 09:43:53 -0500
commit1fbe6f625f69e48c4001051dc1431afc704acfaa (patch)
tree826b741201a2e09a627ed350c6ff36935f5cff79 /drivers/gpu/drm/nouveau/nouveau_fbcon.c
parent0cecdd818cd79d092e36e70dfe3a71f2878d6b96 (diff)
parent384703b8e6cd4c8ef08512e596024e028c91c339 (diff)
Merge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-next
Merge in the upstream tree to bring in the mainline fixes. Conflicts: drivers/gpu/drm/exynos/exynos_drm_fbdev.c drivers/gpu/drm/nouveau/nouveau_sgdma.c
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index defffd140781..dbb151834121 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -488,6 +488,7 @@ int nouveau_fbcon_init(struct drm_device *dev)
488{ 488{
489 struct drm_nouveau_private *dev_priv = dev->dev_private; 489 struct drm_nouveau_private *dev_priv = dev->dev_private;
490 struct nouveau_fbdev *nfbdev; 490 struct nouveau_fbdev *nfbdev;
491 int preferred_bpp;
491 int ret; 492 int ret;
492 493
493 nfbdev = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); 494 nfbdev = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL);
@@ -506,7 +507,15 @@ int nouveau_fbcon_init(struct drm_device *dev)
506 } 507 }
507 508
508 drm_fb_helper_single_add_all_connectors(&nfbdev->helper); 509 drm_fb_helper_single_add_all_connectors(&nfbdev->helper);
509 drm_fb_helper_initial_config(&nfbdev->helper, 32); 510
511 if (dev_priv->vram_size <= 32 * 1024 * 1024)
512 preferred_bpp = 8;
513 else if (dev_priv->vram_size <= 64 * 1024 * 1024)
514 preferred_bpp = 16;
515 else
516 preferred_bpp = 32;
517
518 drm_fb_helper_initial_config(&nfbdev->helper, preferred_bpp);
510 return 0; 519 return 0;
511} 520}
512 521