xf86-video-intel: 3 commits - configure.ac src/i830_dri.c src/i830_exa.c

Eric Anholt anholt at kemper.freedesktop.org
Tue Jan 6 16:42:57 PST 2009


 configure.ac   |   20 +++++++-------------
 src/i830_dri.c |    9 +++++++++
 src/i830_exa.c |   19 +++++++++++--------
 3 files changed, 27 insertions(+), 21 deletions(-)

New commits:
commit 934008a2cbcec0c790580750c672c0367a9e4c55
Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jan 6 10:55:59 2009 -0800

    Always enable KMS if server's new enough, and remove option.
    
    The API should be stable at this point, and we don't want to allow mistakes.

diff --git a/configure.ac b/configure.ac
index ca13eab..6c4ba57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,11 +75,6 @@ AC_ARG_ENABLE(xvmc, AC_HELP_STRING([--disable-xvmc],
               [XVMC="$enableval"],
               [XVMC=auto])
 
-AC_ARG_ENABLE(kms, AC_HELP_STRING([--enable-kms],
-                                  [Enable kernel mode setting support [[default=no]]]),
-              [KMS="$enableval"],
-              [KMS=no])
-
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -112,14 +107,6 @@ if test x$DRI != xno; then
                       [have_dristruct_h="yes"], [have_dristruct_h="no"])
 	AC_CHECK_FILE([${sdkdir}/damage.h],
                       [have_damage_h="yes"], [have_damage_h="no"])
-	if test x$KMS != xno; then
-		dnl exaGetPixmapDriverPrivate required for DRM_MODE.
-		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
-					    [DRM_MODE=yes], [DRM_MODE=no])
-		if test "x$DRM_MODE" = xyes; then
-	   		AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
-		fi
-	fi
 fi
 AC_MSG_CHECKING([whether to include DRI support])
 if test x$DRI = xauto; then
@@ -233,6 +220,13 @@ if test "$DRI" = yes; then
 	fi
 fi
 
+dnl exaGetPixmapDriverPrivate required for DRM_MODE.
+PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
+		  [DRM_MODE=yes], [DRM_MODE=no])
+if test "x$DRM_MODE" = xyes; then
+	AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
+fi
+
 AM_CONDITIONAL(VIDEO_DEBUG, test x$VIDEO_DEBUG = xyes)
 if test "$VIDEO_DEBUG" = yes; then
 	AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
commit 342120be0956bfc12822d1ffbfbd8aaabf3e922f
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 5 23:21:07 2009 -0800

    Fix pin leakage with EXA GTT-mapping shortcut, and crash with UXA on KMS.

diff --git a/src/i830_exa.c b/src/i830_exa.c
index b300fdc..df48dbf 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -811,14 +811,15 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 	    i830->need_sync = FALSE;
 	}
 
-	if (drm_intel_bo_pin(bo, 4096) != 0) {
-	    /* happen in vt switched */
-	    if (dri_bo_map(bo, access == UXA_ACCESS_RW) != 0)
+	if (pScrn->vtSema && !pI830->use_drm_mode) {
+	    if (drm_intel_bo_pin(bo, 4096) != 0)
 		return FALSE;
-	    pixmap->devPrivate.ptr = bo->virtual;
-	} else {
 	    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;
+	    pixmap->devPrivate.ptr = bo->virtual;
 	}
     }
     return TRUE;
@@ -827,6 +828,8 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 static void
 i830_uxa_finish_access (PixmapPtr pixmap)
 {
+    ScrnInfoPtr pScrn = xf86Screens[pixmap->drawable.pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
     dri_bo *bo = i830_get_pixmap_bo (pixmap);
 
     if (bo) {
@@ -834,10 +837,10 @@ i830_uxa_finish_access (PixmapPtr pixmap)
 	ScrnInfoPtr scrn = xf86Screens[screen->myNum];
 	I830Ptr i830 = I830PTR(scrn);
 
-	if (bo->virtual)
-	    dri_bo_unmap(bo);
-	else
+	if (pScrn->vtSema && !pI830->use_drm_mode)
 	    drm_intel_bo_unpin(bo);
+	else
+	    dri_bo_unmap(bo);
 
 	pixmap->devPrivate.ptr = NULL;
 	if (bo == i830->front_buffer->bo)
commit 9a5082d2920c1a212fe935b5a093013e8035c321
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan 5 23:28:50 2009 -0800

    Disable DRI2 buffer tiling on non-965, as those need fence regs for 2D blits.
    
    This fixes glReadPixels failure on single-channel 915GM, as the software code
    for readpixels was actually the only code in the driver doing tiling against
    these buffers (everything else says "rely on fence registers", since the 2D
    blits don't have a "don't rely on fence registers" option).

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 0fe0eca..c4440ce 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1883,6 +1883,15 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
 		break;
 	    }
 
+	    /* Disable tiling on 915-class 3D for now.  Because the 2D blitter
+	     * requires fence regs to operate, and they're not being managed
+	     * by the kernel yet, we don't want to expose tiled buffers to the
+	     * 3D client as it'll just render incorrectly if it pays attention
+	     * to our tiling bits at all.
+	     */
+	    if (!IS_I965G(pI830))
+		tiling = I915_TILING_NONE;
+
 	    if (tiling != I915_TILING_NONE) {
 		bo = i830_get_pixmap_bo(pPixmap);
 		drm_intel_bo_set_tiling(bo, &tiling,


More information about the xorg-commit mailing list