summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-06-04 16:31:16 -0700
committerEric Anholt <eric@anholt.net>2008-06-10 11:37:03 -0700
commitb2216e7bc2f1a35f9fc1794bad83208cd5c583d1 (patch)
tree1eb5c6416740ffb2135a35a7bcfa70a635b8c09b /src/i830_memory.c
parentd0fda9d24c5fe4870cdbd2ba0213091165666a8e (diff)
Use batchbuffers instead of ring emits for general commands.
The batchbuffers are managed using libdrm and bufmgr_fake, and dispatched from the ring from userland.
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index dc48967f..57e4f2e2 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -350,6 +350,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
pI830->textures = NULL;
#endif
pI830->LpRing->mem = NULL;
+ pI830->fake_bufmgr_mem = NULL;
}
void
@@ -1374,6 +1375,14 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
return FALSE;
}
+ pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
+ MB(1), GTT_PAGE_SIZE, 0);
+ if (pI830->fake_bufmgr_mem == NULL) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to allocate fake bufmgr space.\n");
+ return FALSE;
+ }
+
/* even in XAA, 965G needs state mem buffer for rendering */
if (IS_I965G(pI830) && !pI830->noAccel &&
pI830->gen4_render_state_mem == NULL)