xf86-video-intel: 4 commits - configure.ac src/sna/gen5_render.c src/sna/kgem.c src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 12 02:00:57 PST 2014


 configure.ac          |    2 ++
 src/sna/gen5_render.c |    4 +++-
 src/sna/kgem.c        |   15 ++++++++++++++-
 src/sna/sna_accel.c   |    8 ++------
 4 files changed, 21 insertions(+), 8 deletions(-)

New commits:
commit 27663f31163c22f7dfaf8f5a3e45fa1c93a7d9e4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 12 09:58:06 2014 +0000

    sna/gen5: Add a DBG option to force flushes between operations
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 25555e0..a9db697 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -54,6 +54,8 @@
 #define DBG_NO_STATE_CACHE 0
 #define DBG_NO_SURFACE_CACHE 0
 
+#define ALWAYS_FLUSH 0
+
 #define MAX_3D_SIZE 8192
 
 #define GEN5_GRF_BLOCKS(nreg)    ((nreg + 15) / 16 - 1)
@@ -1056,7 +1058,7 @@ gen5_emit_state(struct sna *sna,
 		kgem_bo_mark_dirty(op->dst.bo);
 		flush = false;
 	}
-	if (flush) {
+	if (flush || ALWAYS_FLUSH) {
 		DBG(("%s: forcing flush\n", __FUNCTION__));
 		gen5_emit_pipe_flush(sna);
 	}
commit 834e8078fc1b8d3acba9fa887d6dcdd861e3c15a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 12 09:50:35 2014 +0000

    sna: Retrieve tiling for fbcon
    
    Yikes, there appear to be tiled fbcon framebuffers on the horizon.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index cb64cac..8e46960 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3755,6 +3755,7 @@ discard:
 struct kgem_bo *kgem_create_for_name(struct kgem *kgem, uint32_t name)
 {
 	struct drm_gem_open open_arg;
+	struct drm_i915_gem_get_tiling tiling;
 	struct kgem_bo *bo;
 
 	DBG(("%s(name=%d)\n", __FUNCTION__, name));
@@ -3765,15 +3766,27 @@ struct kgem_bo *kgem_create_for_name(struct kgem *kgem, uint32_t name)
 		return NULL;
 
 	DBG(("%s: new handle=%d\n", __FUNCTION__, open_arg.handle));
+
+	VG_CLEAR(tiling);
+	tiling.handle = open_arg.handle;
+	if (do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_GET_TILING, &tiling)) {
+		DBG(("%s(name=%d) get-tiling failed, ret=%d\n", __FUNCTION__, name, errno));
+		gem_close(kgem->fd, open_arg.handle);
+		return NULL;
+	}
+
+	DBG(("%s: handle=%d, tiling=%d\n", __FUNCTION__, tiling.handle, tiling.tiling_mode));
+
 	bo = __kgem_bo_alloc(open_arg.handle, open_arg.size / PAGE_SIZE);
 	if (bo == NULL) {
 		gem_close(kgem->fd, open_arg.handle);
 		return NULL;
 	}
 
+	bo->tiling = tiling.tiling_mode;
 	bo->reusable = false;
 	bo->flush = true;
-	bo->purged = true; /* no coherency guarrantees */
+	bo->purged = true; /* no coherency guarantees */
 
 	debug_alloc__bo(kgem, bo);
 	return bo;
commit 69d4c15d525065374de50d624388252152a36b8b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 12 07:56:10 2014 +0000

    sna: Delete redundant branch
    
    The MOVE_READ else branch is repeated immediately below when marking up
    damage for MOVE_WRITE, so remove it for simplicity.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index f9246aa..d79eb8a 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2203,11 +2203,6 @@ skip_inplace_map:
 			__sna_damage_destroy(DAMAGE_PTR(priv->gpu_damage));
 			priv->gpu_damage = NULL;
 		}
-	} else {
-		assert(flags & MOVE_WRITE);
-		sna_pixmap_free_gpu(sna, priv);
-		assert(priv->gpu_damage == NULL);
-		assert(priv->clear == false);
 	}
 
 	if (flags & MOVE_WRITE || priv->create & KGEM_CAN_CREATE_LARGE) {
@@ -2216,8 +2211,9 @@ mark_damage:
 		sna_damage_all(&priv->cpu_damage,
 			       pixmap->drawable.width,
 			       pixmap->drawable.height);
-		assert(priv->gpu_damage == NULL);
 		sna_pixmap_free_gpu(sna, priv);
+		assert(priv->gpu_damage == NULL);
+		assert(priv->clear == false);
 
 		if (priv->flush) {
 			assert(!priv->shm);
commit ec39adc93a4a127b34704a2012182b5c72b3a9b3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 11 23:08:35 2014 +0000

    Record Video ABI version that we configure against
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/configure.ac b/configure.ac
index a3114af..ea7473e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,6 +328,7 @@ if test "x$GLAMOR" != "xno"; then
 fi
 
 PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
+ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server`
 
 if test "x$ONLY_UMS" = "xyes"; then
 	UMS="yes"
@@ -726,6 +727,7 @@ fi
 
 echo ""
 echo "AC_PACKAGE_STRING will be compiled with:"
+echo "  Xorg Video ABI version: $ABI_VERSION"
 echo "  Acceleration backends:$accel_msg"
 echo "  Additional debugging support?$debug_msg"
 echo "  Support for Kernel Mode Setting? $KMS"


More information about the xorg-commit mailing list