[Nouveau] [PATCH] Default to 16bpp for low memory cards.

Marcin Slusarz marcin.slusarz at gmail.com
Sun Nov 6 11:32:10 PST 2011


---
 src/nv_driver.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/nv_driver.c b/src/nv_driver.c
index 3467dbe..651ee0e 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 */
-- 
1.7.7



More information about the Nouveau mailing list