summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index b41a73d2..3264a2d2 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1239,7 +1239,14 @@ I830AllocateTextureMemory(ScrnInfoPtr pScrn, const int flags)
if (pI830->mmModeFlags & I830_KERNEL_TEX) {
- size = GetFreeSpace(pScrn);
+ if (dryrun && pI830->pEnt->device->videoRam == 0) {
+ /* If we're laying out a default-sized allocation, then don't be
+ * too greedy and just ask for 32MB.
+ */
+ size = MB(32);
+ } else {
+ size = GetFreeSpace(pScrn);
+ }
if (dryrun && (size < MB(1)))
size = MB(1);
i = myLog2(size / I830_NR_TEX_REGIONS);