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

Chris Wilson ickle at kemper.freedesktop.org
Wed Feb 5 07:31:38 PST 2014


 src/sna/sna_accel.c |   29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

New commits:
commit 79d2f96bdfa0d7ae1567bf4b57b4f86aae424f50
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 5 15:30:30 2014 +0000

    sna: Add some DBG around tiled blts
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=74550
    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 758bf88..e57cb17 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -11955,8 +11955,9 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 	int tile_width, tile_height;
 	int16_t dx, dy;
 
-	DBG(("%s x %d [(%d, %d)x(%d, %d)...]\n",
-	     __FUNCTION__, n, rect->x, rect->y, rect->width, rect->height));
+	DBG(("%s x %d [(%d, %d)x(%d, %d)...], clipped? %d\n",
+	     __FUNCTION__, n, rect->x, rect->y, rect->width, rect->height,
+	     clipped));
 
 	tile_width = tile->drawable.width;
 	tile_height = tile->drawable.height;
@@ -12014,6 +12015,7 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 	}
 
 	get_drawable_deltas(drawable, pixmap, &dx, &dy);
+	DBG(("%s: drawable offset into pixmap = (%d, %d)\n", __FUNCTION__, dx, dy));
 	if (!clipped) {
 		dx += drawable->x;
 		dy += drawable->y;
@@ -12070,6 +12072,8 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 
 		if (clip.data == NULL) {
 			const BoxRec *box = &clip.extents;
+			DBG(("%s: single clip box [(%d, %d), (%d, %d)]",
+			     __FUNCTION__, box->x1, box->y1, box->x2, box->y2));
 			while (n--) {
 				BoxRec r;
 
@@ -12079,6 +12083,13 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 				r.y2 = bound(r.y1, rect->height);
 				rect++;
 
+				DBG(("%s: rectangle [(%d, %d), (%d, %d)]\n",
+				     __FUNCTION__, r.x1, r.y1, r.x2, r.y2));
+				assert(r.x1 + dx >= 0);
+				assert(r.y1 + dy >= 0);
+				assert(r.x2 + dx <= pixmap->drawable.width);
+				assert(r.y2 + dy <= pixmap->drawable.height);
+
 				if (box_intersect(&r, box)) {
 					int height = r.y2 - r.y1;
 					int dst_y = r.y1;
@@ -12140,11 +12151,23 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 				region.extents.y2 = bound(region.extents.y1, rect->height);
 				rect++;
 
+				DBG(("%s: rectangle [(%d, %d), (%d, %d)]\n",
+				     __FUNCTION__,
+				     region.extents.x1,
+				     region.extents.y1,
+				     region.extents.x2,
+				     region.extents.y2));
+				assert(region.extents.x1 + dx >= 0);
+				assert(region.extents.y1 + dy >= 0);
+				assert(region.extents.x2 + dx <= pixmap->drawable.width);
+				assert(region.extents.y2 + dy <= pixmap->drawable.height);
+
 				region.data = NULL;
 				RegionIntersect(&region, &region, &clip);
 
 				nbox = RegionNumRects(&region);
 				box = RegionRects(&region);
+				DBG(("%s: split into %d boxes after clipping\n", __FUNCTION__, nbox));
 				while (nbox--) {
 					int height = box->y2 - box->y1;
 					int dst_y = box->y1;
commit 02eceefa2909075aca0ba3df7fdba835079aeb78
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Feb 5 11:41:42 2014 +0000

    sna: Pass read hints from move-to-cpu to wait_for_shadow
    
    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 d31fa22..758bf88 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1975,7 +1975,7 @@ _sna_pixmap_move_to_cpu(PixmapPtr pixmap, unsigned int flags)
 		goto done;
 	}
 
-	if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, MOVE_READ)) {
+	if (priv->move_to_gpu && !priv->move_to_gpu(sna, priv, priv->gpu_damage ? flags & MOVE_READ: 0)) {
 		DBG(("%s: move-to-gpu override failed\n", __FUNCTION__));
 		return false;
 	}


More information about the xorg-commit mailing list