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

Chris Wilson ickle at kemper.freedesktop.org
Mon Aug 26 15:07:46 PDT 2013


 src/sna/sna_accel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6997c4c2bde319fdf73ead8a9c9965f6548545eb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Aug 26 22:07:49 2013 +0100

    sna: Promote no COWs assertion to a condition check before operating inplace
    
    We can arrive there with a COW and wanting to a CPU mapping, which is
    unfortunate and requires the indirect path instead.
    
    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 d6a8dbf..9db3f27 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2363,6 +2363,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
 	if (USE_INPLACE &&
 	    priv->gpu_damage &&
 	    priv->gpu_bo->tiling == I915_TILING_NONE &&
+	    (priv->cow == NULL || (flags & MOVE_WRITE) == 0) &&
 	    (DAMAGE_IS_ALL(priv->gpu_damage) ||
 	     sna_damage_contains_box__no_reduce(priv->gpu_damage,
 						&region->extents)) &&
@@ -2371,7 +2372,6 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
 	     !__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))) {
 		DBG(("%s: try to operate inplace (CPU), read? %d, write? %d\n",
 		     __FUNCTION__, !!(flags & MOVE_READ), !!(flags & MOVE_WRITE)));
-		assert(priv->cow == NULL || (flags & MOVE_WRITE) == 0);
 		assert(sna_damage_contains_box(priv->gpu_damage, &region->extents) == PIXMAN_REGION_IN);
 		assert(sna_damage_contains_box(priv->cpu_damage, &region->extents) == PIXMAN_REGION_OUT);
 
commit 3b267e52a0892ddb7b4a73e9b06555efe9e0b778
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Aug 26 21:58:57 2013 +0100

    sna: Fix ordering of assert vs the state it checks
    
    It helps to set the state we want to check before actually checking that
    we set it!
    
    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 66d2fd0..d6a8dbf 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2338,8 +2338,8 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
 				}
 				priv->clear = false;
 			}
-			assert_pixmap_damage(pixmap);
 			priv->cpu = false;
+			assert_pixmap_damage(pixmap);
 			if (dx | dy)
 				RegionTranslate(region, -dx, -dy);
 			DBG(("%s: operate inplace\n", __FUNCTION__));


More information about the xorg-commit mailing list