xf86-video-intel: 4 commits - src/sna/gen6_render.c src/sna/gen7_render.c src/sna/kgem.h

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 20 05:15:38 PDT 2012


 src/sna/gen6_render.c |    4 +---
 src/sna/gen7_render.c |   33 +++++++--------------------------
 src/sna/kgem.h        |    1 -
 3 files changed, 8 insertions(+), 30 deletions(-)

New commits:
commit f8b67be8d3b5d5cbe730ba5dba3edd2d30a99d9f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 20 12:39:19 2012 +0100

    sna: Don't clear the needs_flush flag after emitting a flush on the busy bo
    
    We use that flag to check whether we need to check whether the bo is
    still busy upon destruction, so only clear it if the bo is marked as
    idle.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 0ab8033..408ad03 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -280,7 +280,6 @@ static inline void kgem_bo_flush(struct kgem *kgem, struct kgem_bo *bo)
 	 * not actualy care.
 	 */
 	(void)__kgem_flush(kgem, bo);
-	bo->needs_flush = false;
 }
 
 static inline struct kgem_bo *kgem_bo_reference(struct kgem_bo *bo)
commit 5419bbb483af595d7021e49debef7700c599217e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 20 11:21:52 2012 +0100

    sna/gen7: Prefer BLT for copies
    
    It's faster for where the cost of the extra batches and ring switching
    do not dominate...
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 915e928..c474767 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2412,14 +2412,14 @@ gen7_composite_set_target(struct sna *sna, struct sna_composite_op *op, PictureP
 	return TRUE;
 }
 
-static bool prefer_blt_ring(struct sna *sna)
+inline static bool can_switch_rings(struct sna *sna)
 {
-	return sna->kgem.ring != KGEM_RENDER;
+	return sna->kgem.mode == KGEM_NONE && sna->kgem.has_semaphores && !NO_RING_SWITCH;
 }
 
-static bool can_switch_rings(struct sna *sna)
+inline static bool prefer_blt_ring(struct sna *sna)
 {
-	return sna->kgem.mode == KGEM_NONE && sna->kgem.has_semaphores && !NO_RING_SWITCH;
+	return sna->kgem.ring != KGEM_RENDER || can_switch_rings(sna);
 }
 
 static Bool
@@ -3308,7 +3308,7 @@ static inline bool prefer_blt_copy(struct sna *sna,
 				   PixmapPtr src, struct kgem_bo *src_bo,
 				   PixmapPtr dst, struct kgem_bo *dst_bo)
 {
-	return (sna->kgem.ring == KGEM_BLT ||
+	return (prefer_blt_ring(sna) ||
 		prefer_blt_bo(sna, src, src_bo) ||
 		prefer_blt_bo(sna, dst, dst_bo));
 }
@@ -3715,9 +3715,7 @@ gen7_emit_fill_state(struct sna *sna, const struct sna_composite_op *op)
 static inline bool prefer_blt_fill(struct sna *sna,
 				   struct kgem_bo *bo)
 {
-	return (can_switch_rings(sna) ||
-		prefer_blt_ring(sna) ||
-		untiled_tlb_miss(bo));
+	return prefer_blt_ring(sna) || untiled_tlb_miss(bo);
 }
 
 static Bool
commit 1c0bb8c4c93a43e2932429a9f6c23d91f1be2060
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 20 10:57:40 2012 +0100

    sna/gen7: Keep using RENDER paths for large pixmaps
    
    As the 3D pipeline is quite versatile and we only need to force BLT if
    we cannot extract the subregion.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index bea358e..915e928 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2438,21 +2438,6 @@ try_blt(struct sna *sna,
 		return TRUE;
 	}
 
-	if (too_large(dst->pDrawable->width, dst->pDrawable->height)) {
-		DBG(("%s: dst too large for 3D pipe (%d, %d)\n",
-		     __FUNCTION__,
-		     dst->pDrawable->width, dst->pDrawable->height));
-		return TRUE;
-	}
-
-	if (src->pDrawable &&
-	    too_large(src->pDrawable->width, src->pDrawable->height)) {
-		DBG(("%s: src too large for 3D pipe (%d, %d)\n",
-		     __FUNCTION__,
-		     src->pDrawable->width, src->pDrawable->height));
-		return TRUE;
-	}
-
 	if (can_switch_rings(sna)) {
 		if (sna_picture_is_solid(src, NULL))
 			return TRUE;
commit b238f64e8a53883cfe7c568e37ef18bbee77996e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 20 10:46:59 2012 +0100

    sna/gen[67]: Prefer to not force BLT paths for large pixmaps
    
    The sampler can in fact handler subregions of large pixmaps quite well,
    and so we prefer to keep using the 3D pipeline so long as the operation
    fits in. If not, then switch to the BLT in order to avoid the temporary
    surface dance.
    
    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 b927d08..563e04c 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -3237,9 +3237,7 @@ static bool prefer_blt_bo(struct sna *sna,
 			  PixmapPtr pixmap,
 			  struct kgem_bo *bo)
 {
-	return (too_large(pixmap->drawable.width, pixmap->drawable.height) ||
-		untiled_tlb_miss(bo)) &&
-		kgem_bo_can_blt(&sna->kgem, bo);
+	return untiled_tlb_miss(bo) && kgem_bo_can_blt(&sna->kgem, bo);
 }
 
 static inline bool prefer_blt_copy(struct sna *sna,
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 3c07d8d..bea358e 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -3316,9 +3316,7 @@ static bool prefer_blt_bo(struct sna *sna,
 			  PixmapPtr pixmap,
 			  struct kgem_bo *bo)
 {
-	return (too_large(pixmap->drawable.width, pixmap->drawable.height) ||
-		untiled_tlb_miss(bo)) &&
-		kgem_bo_can_blt(&sna->kgem, bo);
+	return untiled_tlb_miss(bo) && kgem_bo_can_blt(&sna->kgem, bo);
 }
 
 static inline bool prefer_blt_copy(struct sna *sna,


More information about the xorg-commit mailing list