From ca0fa875e8bb5cb778d4db7d8053ec0a5ae34ef4 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Mar 2007 11:46:45 -0800 Subject: [PATCH] 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. --- src/i830_memory.c | 30 +++++++++++++++--------------- 1 file 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,