xf86-video-intel: Branch 'xf86-video-intel-2.6-branch' - 2 commits - src/drmmode_display.c src/i830_exa.c

Zhenyu Wang zhen at kemper.freedesktop.org
Tue Dec 30 18:32:29 PST 2008


 src/drmmode_display.c |   18 +++++++-----------
 src/i830_exa.c        |   17 +++++------------
 2 files changed, 12 insertions(+), 23 deletions(-)

New commits:
commit d00c69f9cb95bb9bbe5dcb5f7a740e3bd2c00e2a
Author: Kristian Høgsberg <krh at redhat.com>
Date:   Mon Dec 15 14:54:20 2008 -0500

    Quiet some KMS warnings.
    (cherry picked from commit e6479f96e5d8da39fcbb5376c4a66a1f924ec4e4)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 87b5821..4994251 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -222,7 +222,6 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 static void
 drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
 {
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	ScrnInfoPtr pScrn = crtc->scrn;
 	I830Ptr pI830 = I830PTR(pScrn);
 	int ret;
@@ -326,21 +325,20 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 static void
 drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
 {
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
 	if (rotate_pixmap)
 		FreeScratchPixmapHeader(rotate_pixmap);
 
-	if (data) {
 #if 0
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+	if (data) {
 		/* Be sure to sync acceleration before the memory gets unbound. */
 		drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
 		drmmode_crtc->rotate_fb_id = 0;
 		dri_bo_unreference(drmmode_crtc->rotate_bo);
 		drmmode_crtc->rotate_bo = NULL;
-#endif
 	}
-
+#endif
 }
 
 static const xf86CrtcFuncsRec drmmode_crtc_funcs = {
@@ -371,8 +369,6 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
 {
 	xf86CrtcPtr crtc;
 	drmmode_crtc_private_ptr drmmode_crtc;
-	I830Ptr pI830 = I830PTR(pScrn);
-	int ret;
 
 	crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs);
 	if (crtc == NULL)
@@ -650,12 +646,12 @@ void drmmode_set_fb(ScrnInfoPtr scrn, drmmode_ptr drmmode, int width,
 
 Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
 {
-	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
-	int i;
-
 	return FALSE;
 
 #if 0
+	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
+	int i;
+
 	for (i = 0; i < config->num_crtc; i++) {
 		xf86CrtcPtr crtc = config->crtc[i];
 		drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
commit fde2990e26ffb0736e78a82178a31df8807cf1ed
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.
    (cherry picked from commit aae4008096399a0e84abc7c016b35092caf9db25)

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 4a04644..636aa0a 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