xf86-video-intel: 3 commits - src/i830_driver.c src/i830_memory.c

Eric Anholt anholt at kemper.freedesktop.org
Wed Mar 7 00:00:49 EET 2007


 src/i830_driver.c |   17 +----------------
 src/i830_memory.c |    8 +++++---
 2 files changed, 6 insertions(+), 19 deletions(-)

New commits:
diff-tree b07dfbba5df7728232b38211c623185116dcea5c (from 94c37f35872487c04136fb659526bffefd9c46ad)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 6 13:59:14 2007 -0800

    Remove leftover code that was disabling tiling after we set it up.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1aa06b9..bc6e07c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1913,18 +1913,6 @@ RestoreHWState(ScrnInfoPtr pScrn)
 }
 
 static void
-InitRegisterRec(ScrnInfoPtr pScrn)
-{
-   I830Ptr pI830 = I830PTR(pScrn);
-   int i;
-
-   if (!I830IsPrimary(pScrn)) return;
-
-   for (i = 0; i < 8; i++)
-      pI830->fence[i] = 0;
-}
-
-static void
 I830PointerMoved(int index, int x, int y)
 {
    ScrnInfoPtr pScrn = xf86Screens[index];
@@ -2505,8 +2493,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr 
    }
 #endif
 
-   InitRegisterRec(pScrn);
-
 #ifdef XF86DRI
    /*
     * pI830->directRenderingDisabled is set once in PreInit.  Reinitialise
diff-tree 94c37f35872487c04136fb659526bffefd9c46ad (from 30bb719ca0abc2599ffb89e59f297fa9a0a00c3c)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 6 13:57:04 2007 -0800

    Make the depth buffer X tiled instead of Y, and fix a Y tiling nit on 945.
    
    The previous code claimed to set the depth buffer up as Y tiled, but due to
    lack of implementation in SetFence, it ended up being X tiled.  Actually
    setting the Y tiling flag in the new version broke the depth buffer, so just
    switch the depth buffer to X tiling, which appears to work fine.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index ea6b90d..f0b50aa 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1121,8 +1121,8 @@ i830_allocate_depthbuffer(ScrnInfoPtr pS
 	pI830->depth_buffer =
 	    i830_allocate_memory_tiled(pScrn, "depth buffer", size, pitch,
 				       GTT_PAGE_SIZE, ALIGN_BOTH_ENDS,
-				       TILING_YMAJOR);
-	pI830->depth_tiled = FENCE_YMAJOR;
+				       TILING_XMAJOR);
+	pI830->depth_tiled = FENCE_XMAJOR;
     }
 
     /* Otherwise, allocate it linear. */
@@ -1369,7 +1369,9 @@ i830_set_fence(ScrnInfoPtr pScrn, int nr
    	}
     }
 
-    if (IS_I9XX(pI830))
+    if ((IS_I945G(pI830) || IS_I945GM(pI830)) && tile_format == TILING_YMAJOR)
+	fence_pitch = pitch / 128;
+    else if (IS_I9XX(pI830))
 	fence_pitch = pitch / 512;
     else
 	fence_pitch = pitch / 128;
diff-tree 30bb719ca0abc2599ffb89e59f297fa9a0a00c3c (from 1e1b45fa6ed1683cba4ae73ac98933e74c3ab9d6)
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Mar 6 12:23:43 2007 -0800

    Continue to allocate the legacy texture pool by default.
    
    This is a partial revert of 7358642e64ab6d13bc1dc1a44703ee66d715ff61
    
    If we don't allocate it now, when the DRM version is too low there won't be any
    memory allocated and DRI will fail.  Instead, waste the memory in the i915tex
    case for now, and leave fixing it right (check DRM version up front and decide
    which memory manager to set up) to later.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index a27d805..1aa06b9 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1234,14 +1234,13 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
       pI830->mmModeFlags = 0;
 
       if (!pI830->directRenderingDisabled) {
+	 pI830->mmModeFlags = I830_KERNEL_TEX;
 #ifdef XF86DRI_MM
 	 Bool tmp = FALSE;
 
 	 if (!IS_I965G(pI830))
 	    pI830->mmModeFlags |= I830_KERNEL_MM;
-	 else
 #endif
-	    pI830->mmModeFlags |= I830_KERNEL_TEX;
 
 	 from = X_PROBED;
 



More information about the xorg-commit mailing list