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

Carl Worth cworth at kemper.freedesktop.org
Thu Mar 19 16:36:08 PDT 2009


 src/i830_memory.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit e2465249a90b9aefe6d7a96eb56a51fde54698a0
Author: Jesse Barnes <jbarnes at nietzche.localdomain>
Date:   Thu Mar 19 13:25:29 2009 -0700

    Don't install fences if the kernel is managing them
    
    If execbuffer is setting up fences, it also means that the kernel is
    managing them at pin time, so installing one in the 2D driver in that
    case is an error.  The fence should stick around as long as the buffer
    is pinned (the kernel won't steal these), though it will be freed at
    leavevt and re-allocated at entervt.
    
    On 965+ chips, the pin ioctl will *not* install a fence reg, but that's
    also ok because all 965+ operations include tiling bits, and sw
    fallbacks will be protected by prepare/finish access hooks, which will
    either access the backing store or use the GTT, which will ensure proper
    fencing at fault time.
    
    Fixes #20265.
    
    Acked-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 636d252f3b1eac687f7b11952e949c383cb86ed4)

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 96e1763..36dab11 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -253,7 +253,8 @@ i830_bind_memory(ScrnInfoPtr pScrn, i830_memory *mem)
 	mem->bound = TRUE;
     }
 
-    if (mem->tiling != TILE_NONE && !pI830->use_drm_mode) {
+    if (mem->tiling != TILE_NONE && !pI830->use_drm_mode &&
+	!pI830->kernel_exec_fencing) {
 	mem->fence_nr = i830_set_tiling(pScrn, mem->offset, mem->pitch,
 					mem->allocated_size, mem->tiling);
     }
@@ -532,12 +533,8 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
 		int ret;
 
 		sp.param = I915_SETPARAM_NUM_USED_FENCES;
-		if (pI830->use_drm_mode)
-		    sp.value = 0; /* kernel gets them all */
-		else if (pI830->directRenderingType == DRI_XF86DRI)
-		    sp.value = 3; /* front/back/depth */
-		else
-		    sp.value = 2; /* just front for DRI2 (both old & new though) */
+		sp.value = 0; /* kernel gets them all */
+
 		ret = drmCommandWrite(pI830->drmSubFD, DRM_I915_SETPARAM, &sp,
 				      sizeof(sp));
 		if (ret == 0)


More information about the xorg-commit mailing list