Permalink
Browse files

Default to 16bpp for low memory cards.

  • Loading branch information...
1 parent 5aa30ae commit 9fa0c6c74d0b9f7d66ebe3c99184eaa13abeb1a0 @mslusarz mslusarz committed with Nov 6, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/nv_driver.c
View
@@ -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 */

0 comments on commit 9fa0c6c

Please sign in to comment.