summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2011-11-06 20:32:10 +0100
committerBen Skeggs <bskeggs@redhat.com>2011-11-10 09:13:11 +1000
commit9fa0c6c74d0b9f7d66ebe3c99184eaa13abeb1a0 (patch)
tree5e9f32334d88a48b9d47e58d9dd4293b9246dd17
parent5aa30ae6554c957609929ef29d1b27c89e9a7f06 (diff)
downloadxorg-driver-xf86-video-nouveau-9fa0c6c74d0b9f7d66ebe3c99184eaa13abeb1a0.tar.gz
Default to 16bpp for low memory cards.
-rw-r--r--src/nv_driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nv_driver.c b/src/nv_driver.c
index f0bdb58..87ef2c4 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -603,6 +603,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
const char *reason;
uint64_t v;
int ret;
+ int defaultDepth = 0;
if (flags & PROBE_DETECT) {
EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
@@ -701,7 +702,9 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
* The first thing we should figure out is the depth, bpp, etc.
*/
- if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support32bppFb)) {
+ if (dev->vm_vram_size <= 16 * 1024 * 1024)
+ defaultDepth = 16;
+ if (!xf86SetDepthBpp(pScrn, defaultDepth, 0, 0, Support32bppFb)) {
NVPreInitFail("\n");
} else {
/* Check that the returned depth is one we support */