summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-03-02 11:46:45 -0800
committerEric Anholt <eric@anholt.net>2007-03-02 11:53:31 -0800
commitca0fa875e8bb5cb778d4db7d8053ec0a5ae34ef4 (patch)
tree0fcd155604d1421ca263bb41a8541a51421a9bd0 /src
parent5a73624b9bcce0004e5b72c74667c9dd504b9c3e (diff)
Move EXA offscreen memory back after framebuffer to avoid fallbacks.
Without this, the EXA code decides that the framebuffer is not in video memory because it's not located between the start of video memory and the end of EXA allocator memory. We should either have EXA let the driver decide if a pointer is in video memory, or add a new field for "end of video memory" (not just end of EXA offscreen allocation), but this fixes things for now.
Diffstat (limited to 'src')
-rw-r--r--src/i830_memory.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index b83078a5..5cddf173 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -945,6 +945,21 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
i830_allocate_overlay(pScrn);
#endif
+ if (pI830->entityPrivate && pI830->entityPrivate->pScrn_2) {
+ I830EntPtr pI830Ent = pI830->entityPrivate;
+ I830Ptr pI8302 = I830PTR(pI830Ent->pScrn_2);
+
+ pI830->front_buffer_2 =
+ i830_allocate_framebuffer(pI830Ent->pScrn_2, pI8302,
+ &pI830->FbMemBox2, TRUE, 0);
+ if (pI830->front_buffer_2 == NULL)
+ return FALSE;
+ }
+ pI830->front_buffer =
+ i830_allocate_framebuffer(pScrn, pI830, &pI830->FbMemBox, FALSE, 0);
+ if (pI830->front_buffer == NULL)
+ return FALSE;
+
#ifdef I830_USE_EXA
if (pI830->useEXA) {
if (pI830->exa_offscreen == NULL) {
@@ -981,21 +996,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
}
#endif /* I830_USE_EXA */
- if (pI830->entityPrivate && pI830->entityPrivate->pScrn_2) {
- I830EntPtr pI830Ent = pI830->entityPrivate;
- I830Ptr pI8302 = I830PTR(pI830Ent->pScrn_2);
-
- pI830->front_buffer_2 =
- i830_allocate_framebuffer(pI830Ent->pScrn_2, pI8302,
- &pI830->FbMemBox2, TRUE, 0);
- if (pI830->front_buffer_2 == NULL)
- return FALSE;
- }
- pI830->front_buffer =
- i830_allocate_framebuffer(pScrn, pI830, &pI830->FbMemBox, FALSE, 0);
- if (pI830->front_buffer == NULL)
- return FALSE;
-
if (!pI830->noAccel && !pI830->useEXA) {
pI830->xaa_scratch =
i830_allocate_memory(pScrn, "xaa scratch", MAX_SCRATCH_BUFFER_SIZE,