xf86-video-intel: src/i830_exa.c

Eric Anholt anholt at kemper.freedesktop.org
Thu Dec 18 09:05:51 PST 2008


 src/i830_exa.c |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit aae4008096399a0e84abc7c016b35092caf9db25
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Dec 17 14:25:22 2008 -0800

    uxa: Do a hack to use the aperture mapping instead of bo_map in sw fallbacks.
    
    Because of how fallbacky the uxa rendering core is, and our inability (without
    wfb in userland or page faulting in the kernel) to tell the kernel just where
    we're going to fall back, the clflush overhead can become outrageous, for
    example with emacs and xcompmgr.  Instead of using drm_intel_bo_map, pin the
    buffer and do the fallback to the aperture mapping.  This gets us the bad old
    performance that fb is designed for, instead of bad new performance.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 3e3487e..df2a5ab 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -785,17 +785,11 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	/* For tiled front buffer, short-circuit to the GTT mapping. */
-	if (i830_pixmap_tiled(pixmap)) {
-	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
-
-	    pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
-	} else {
-	    if (dri_bo_map (bo, access == UXA_ACCESS_RW) != 0)
-		return FALSE;
+	if (drm_intel_bo_pin(bo, 4096) != 0)
+	    return FALSE;
 
-	    pixmap->devPrivate.ptr = bo->virtual;
-	}
+	drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
+	pixmap->devPrivate.ptr = pI830->FbBase + bo->offset;
     }
     return TRUE;
 }
@@ -810,8 +804,7 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	if (!i830_pixmap_tiled(pixmap))
-	    dri_bo_unmap(bo);
+	drm_intel_bo_unpin(bo);
 
 	pixmap->devPrivate.ptr = NULL;
 	if (bo == i830->front_buffer->bo)


More information about the xorg-commit mailing list