xf86-video-intel: Branch 'modesetting' - src/i830_memory.c

Eric Anholt anholt at kemper.freedesktop.org
Fri Mar 2 22:00:57 EET 2007


 src/i830_memory.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

New commits:
diff-tree ca0fa875e8bb5cb778d4db7d8053ec0a5ae34ef4 (from 5a73624b9bcce0004e5b72c74667c9dd504b9c3e)
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 2 11:46:45 2007 -0800

    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.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index b83078a..5cddf17 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -945,6 +945,21 @@ i830_allocate_2d_memory(ScrnInfoPtr pScr
 	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 pScr
     }
 #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,



More information about the xorg-commit mailing list