commit 268ae87d4550ead4c514f55dfe3108d282eec80b Author: György Balló Date: Sun Oct 30 02:46:59 2011 +0200 exa: set max dimensions based on available VRAM It ensures that we always have enough space in VRAM to process images. Fix memory flush on 64 MB cards, and add back exa support for cards that have 32 MB or less memory (with a minimal 8 MB VRAM). Resolves https://bugs.freedesktop.org/show_bug.cgi?id=39010 diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 6ffee2a..4ed2482 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -322,7 +322,7 @@ nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth, return calloc(1, sizeof(*nvpix)); if (!pNv->exa_force_cp && - pNv->dev->vm_vram_size <= 32*1024*1024) + pNv->dev->vm_vram_size < 8*1020*1020) return NULL; nvpix = calloc(1, sizeof(*nvpix)); @@ -506,16 +506,20 @@ nouveau_exa_init(ScreenPtr pScreen) exa->CreatePixmap2 = nouveau_exa_create_pixmap; exa->DestroyPixmap = nouveau_exa_destroy_pixmap; - if (pNv->Architecture >= NV_ARCH_50) { - exa->maxX = 8192; - exa->maxY = 8192; + if (pNv->dev->vm_vram_size >= 512*1020*1020) { + exa->maxX = 8190; + exa->maxY = 8190; } else - if (pNv->Architecture >= NV_ARCH_10) { - exa->maxX = 4096; - exa->maxY = 4096; + if (pNv->dev->vm_vram_size >= 128*1020*1020) { + exa->maxX = 4094; + exa->maxY = 4094; + } else + if (pNv->dev->vm_vram_size >= 32*1020*1020) { + exa->maxX = 2046; + exa->maxY = 2046; } else { - exa->maxX = 2048; - exa->maxY = 2048; + exa->maxX = 1022; + exa->maxY = 1022; } exa->MarkSync = nouveau_exa_mark_sync;