xf86-video-intel: 4 commits - src/sna/gen3_render.c src/sna/sna_accel.c src/sna/sna_blt.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Sep 13 12:42:23 PDT 2012


 src/sna/gen3_render.c |   13 ++-----------
 src/sna/sna_accel.c   |    5 +++++
 src/sna/sna_blt.c     |   17 +++++++++++++----
 3 files changed, 20 insertions(+), 15 deletions(-)

New commits:
commit 6c7f998f7bda4f4f1286e079412d5d3a5b2eb073
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 13 20:41:23 2012 +0100

    sna: Fix BLT composite offset
    
    Reported-by: Jiri Slaby <jirislaby at gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54868
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 120d9a5..757447b 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1990,8 +1990,8 @@ sna_blt_composite__convert(struct sna *sna,
 	}
 
 	tmp->u.blt.src_pixmap = NULL;
-	tmp->u.blt.sx = x - dst_x;
-	tmp->u.blt.sy = y - dst_y;
+	tmp->u.blt.sx = tmp->src.offset[0];
+	tmp->u.blt.sy = tmp->src.offset[1];
 	DBG(("%s: blt dst offset (%d, %d), source offset (%d, %d), with alpha fixup? %x\n",
 	     __FUNCTION__,
 	     tmp->dst.x, tmp->dst.y, tmp->u.blt.sx, tmp->u.blt.sy, alpha_fixup));
commit 2575cd0d236b4e1694e3185a487ebfd8bfe6499f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 13 20:08:37 2012 +0100

    sna: Avoid corrupting the CPU bo when compositing fallback data through BLT
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index c286918..120d9a5 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1866,10 +1866,11 @@ clear:
 			     __FUNCTION__));
 		} else {
 			ret = prepare_blt_copy(sna, tmp, bo, alpha_fixup);
-			if (fallback)
-				ret = prepare_blt_put(sna, tmp, alpha_fixup);
+			if (fallback && !ret)
+				goto put;
 		}
 	} else {
+put:
 		if (!tmp->dst.bo) {
 			RegionRec region;
 
@@ -1879,6 +1880,14 @@ clear:
 			if (!sna_drawable_move_region_to_cpu(dst->pDrawable, &region,
 							MOVE_INPLACE_HINT | MOVE_WRITE))
 				return false;
+		} else {
+			if (tmp->dst.bo == sna_pixmap(tmp->dst.pixmap)->cpu_bo) {
+				assert(kgem_bo_is_busy(tmp->dst.bo));
+				tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable,
+								  FORCE_GPU | PREFER_GPU,
+								  &dst_box,
+								  &tmp->damage);
+			}
 		}
 		ret = prepare_blt_put(sna, tmp, alpha_fixup);
 	}
commit 5781de2e5ab0d7e8e62965bda714789879555ed4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 13 19:53:29 2012 +0100

    sna/gen3: Tidy NO_COMPOSITE debugging
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c
index c5ec9bc..60e197e 100644
--- a/src/sna/gen3_render.c
+++ b/src/sna/gen3_render.c
@@ -2811,17 +2811,6 @@ gen3_render_composite(struct sna *sna,
 		return false;
 	}
 
-#if NO_COMPOSITE
-	if (mask)
-		return false;
-
-	return sna_blt_composite(sna, op,
-				 src, dst,
-				 src_x, src_y,
-				 dst_x, dst_y,
-				 width, height, tmp);
-#endif
-
 	/* Try to use the BLT engine unless it implies a
 	 * 3D -> 2D context switch.
 	 */
@@ -4688,7 +4677,9 @@ bool gen3_render_init(struct sna *sna)
 {
 	struct sna_render *render = &sna->render;
 
+#if !NO_COMPOSITE
 	render->composite = gen3_render_composite;
+#endif
 #if !NO_COMPOSITE_SPANS
 	render->check_composite_spans = gen3_check_composite_spans;
 	render->composite_spans = gen3_render_composite_spans;
commit dd1432b2c00c94ac75af4740b66b5cd1a573e261
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Sep 13 19:47:29 2012 +0100

    sna: Do not attempt to change tiling if wedged
    
    The caller will just have to live with the current tiling, which should
    be fine in most cases, in other cases the gpu is wedged...
    
    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 5bff247..7db7368 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -564,6 +564,11 @@ struct kgem_bo *sna_pixmap_change_tiling(PixmapPtr pixmap, uint32_t tiling)
 		return NULL;
 	}
 
+	if (wedged(sna)) {
+		DBG(("%s: can't convert bo, wedged\n", __FUNCTION__));
+		return NULL;
+	}
+
 	assert_pixmap_damage(pixmap);
 
 	bo = kgem_create_2d(&sna->kgem,


More information about the xorg-commit mailing list