xf86-video-intel: 2 commits - src/sna/gen6_render.c src/sna/gen7_render.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Aug 29 03:54:35 PDT 2013


 src/sna/gen6_render.c |   27 +++++++++++++++++++--------
 src/sna/gen7_render.c |   27 +++++++++++++++++++--------
 2 files changed, 38 insertions(+), 16 deletions(-)

New commits:
commit 92a43caab96e7f49c541fb999b75925914d9981a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Aug 28 14:51:09 2013 +0100

    sna/gen6+: Don't force a ring switch for likely TLB misses if already busy
    
    If the target is already on the render ring, don't force the switch away.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index e63a0cf..1db6c95 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1891,6 +1891,9 @@ inline static bool can_switch_to_blt(struct sna *sna,
 
 static inline bool untiled_tlb_miss(struct kgem_bo *bo)
 {
+	if (kgem_bo_is_render(bo))
+		return false;
+
 	return bo->tiling == I915_TILING_NONE && bo->pitch >= 4096;
 }
 
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index ad8e2b7..e92a83b 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2178,6 +2178,9 @@ inline static bool prefer_blt_ring(struct sna *sna,
 				   struct kgem_bo *bo,
 				   unsigned flags)
 {
+	if (kgem_bo_is_render(bo))
+		return false;
+
 	return can_switch_to_blt(sna, bo, flags);
 }
 
commit f22d7f68b8b1bd5caf5ae831fca63eb1e6957520
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Aug 28 14:24:33 2013 +0100

    sna/gen6+: Improve ring stickyness for BLT composite ops
    
    Rearrange the tests so that we check both src/dst for which rings they
    are currently on.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 4829f03..e63a0cf 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -1916,14 +1916,7 @@ try_blt(struct sna *sna,
 {
 	struct kgem_bo *bo;
 
-	bo = __sna_drawable_peek_bo(dst->pDrawable);
-	if (bo == NULL)
-		return true;
-
-	if (bo->rq)
-		return RQ_IS_BLT(bo->rq);
-
-	if (sna->kgem.ring == KGEM_BLT) {
+	if (sna->kgem.mode == KGEM_BLT) {
 		DBG(("%s: already performing BLT\n", __FUNCTION__));
 		return true;
 	}
@@ -1934,9 +1927,24 @@ try_blt(struct sna *sna,
 		return true;
 	}
 
+	bo = __sna_drawable_peek_bo(dst->pDrawable);
+	if (bo && bo->rq)
+		return RQ_IS_BLT(bo->rq);
+
 	if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0))
 		return true;
 
+	if (src->pDrawable) {
+		bo = __sna_drawable_peek_bo(src->pDrawable);
+		if (bo && bo->rq)
+			return RQ_IS_BLT(bo->rq);
+	}
+
+	if (sna->kgem.ring == KGEM_BLT) {
+		DBG(("%s: already performing BLT\n", __FUNCTION__));
+		return true;
+	}
+
 	return false;
 }
 
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index ff2ddb7..ad8e2b7 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2197,14 +2197,7 @@ try_blt(struct sna *sna,
 {
 	struct kgem_bo *bo;
 
-	bo = __sna_drawable_peek_bo(dst->pDrawable);
-	if (bo == NULL)
-		return true;
-
-	if (bo->rq)
-		return RQ_IS_BLT(bo->rq);
-
-	if (sna->kgem.ring == KGEM_BLT) {
+	if (sna->kgem.mode == KGEM_BLT) {
 		DBG(("%s: already performing BLT\n", __FUNCTION__));
 		return true;
 	}
@@ -2215,9 +2208,24 @@ try_blt(struct sna *sna,
 		return true;
 	}
 
+	bo = __sna_drawable_peek_bo(dst->pDrawable);
+	if (bo && bo->rq)
+		return RQ_IS_BLT(bo->rq);
+
 	if (sna_picture_is_solid(src, NULL) && can_switch_to_blt(sna, NULL, 0))
 		return true;
 
+	if (src->pDrawable) {
+		bo = __sna_drawable_peek_bo(src->pDrawable);
+		if (bo && bo->rq)
+			return RQ_IS_BLT(bo->rq);
+	}
+
+	if (sna->kgem.ring == KGEM_BLT) {
+		DBG(("%s: already performing BLT\n", __FUNCTION__));
+		return true;
+	}
+
 	return false;
 }
 


More information about the xorg-commit mailing list