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

Zhenyu Wang zhen at kemper.freedesktop.org
Thu Jan 4 08:29:42 EET 2007


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

New commits:
diff-tree 2ff47146cda87d9e18ca9e2e2d8a114b1d109474 (from 6b977f0eca388a295ca7348f5960bd8e0192cf1d)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Thu Jan 4 14:33:41 2007 +0800

    Fix G965 EXA mem binding
    
    Check if exa is really in use.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 4a8d480..85336df 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -905,7 +905,7 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, 
 		       "offscreen memory at 0x%lx, size %ld KB\n", 
 			pI830->Offscreen.Start, pI830->Offscreen.Size/1024);
       }
-      if (IS_I965G(pI830)) {
+      if (pI830->useEXA && IS_I965G(pI830)) {
           memset(&(pI830->EXAStateMem), 0, sizeof(I830MemRange));
           pI830->EXAStateMem.Key = -1;
           size = ROUND_TO_PAGE(EXA_LINEAR_EXTRA);
@@ -1565,9 +1565,11 @@ I830FixupOffsets(ScrnInfoPtr pScrn)
    }
 #endif
 #ifdef I830_USE_EXA
-   I830FixOffset(pScrn, &(pI830->Offscreen));
-   if (IS_I965G(pI830))
-       I830FixOffset(pScrn, &(pI830->EXAStateMem));
+   if (pI830->useEXA) {
+      I830FixOffset(pScrn, &(pI830->Offscreen));
+      if (IS_I965G(pI830))
+          I830FixOffset(pScrn, &(pI830->EXAStateMem));
+   }
 #endif
    return TRUE;
 }
@@ -1970,10 +1972,12 @@ I830BindAGPMemory(ScrnInfoPtr pScrn)
       }
 #endif
 #ifdef I830_USE_EXA
-     if (!BindMemRange(pScrn, &(pI830->Offscreen)))
-	return FALSE;
-     if (IS_I965G(pI830) && !BindMemRange(pScrn, &(pI830->EXAStateMem)))
-	return FALSE;
+     if (pI830->useEXA) {
+         if (!BindMemRange(pScrn, &(pI830->Offscreen)))
+	    return FALSE;
+         if (IS_I965G(pI830) && !BindMemRange(pScrn, &(pI830->EXAStateMem)))
+	    return FALSE;
+     }
 #endif
       pI830->GttBound = 1;
    }
@@ -2060,10 +2064,12 @@ I830UnbindAGPMemory(ScrnInfoPtr pScrn)
       }
 #endif
 #ifdef I830_USE_EXA
-     if (!UnbindMemRange(pScrn, &(pI830->Offscreen)))
-	return FALSE;
-     if (IS_I965G(pI830) && !UnbindMemRange(pScrn, &(pI830->EXAStateMem)))
-	return FALSE;
+     if (pI830->useEXA) {
+         if (!UnbindMemRange(pScrn, &(pI830->Offscreen)))
+	    return FALSE;
+         if (IS_I965G(pI830) && !UnbindMemRange(pScrn, &(pI830->EXAStateMem)))
+	    return FALSE;
+     }
 #endif
       if (!xf86ReleaseGART(pScrn->scrnIndex))
 	 return FALSE;



More information about the xorg-commit mailing list