xf86-video-intel: 3 commits - src/sna/sna_accel.c tools/virtual.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jan 20 06:36:27 PST 2014


 src/sna/sna_accel.c |   28 +++++++++++++++++++++-------
 tools/virtual.c     |   12 ++++++++----
 2 files changed, 29 insertions(+), 11 deletions(-)

New commits:
commit 4c7b183fd21b461f9f18662c3b9d9732b6bef13d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 20 14:35:55 2014 +0000

    sna: Short-cut the fallback for XCopyArea with depth < 8
    
    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 9378c67..c431417 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6401,14 +6401,14 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	if (gc->planemask == 0)
 		return NULL;
 
-	DBG(("%s: src=(%d, %d)x(%d, %d)+(%d, %d) -> dst=(%d, %d)+(%d, %d); alu=%d, pm=%lx\n",
+	DBG(("%s: src=(%d, %d)x(%d, %d)+(%d, %d) -> dst=(%d, %d)+(%d, %d); alu=%d, pm=%lx, depth=%d\n",
 	     __FUNCTION__,
 	     src_x, src_y, width, height, src->x, src->y,
 	     dst_x, dst_y, dst->x, dst->y,
-	     gc->alu, gc->planemask));
+	     gc->alu, gc->planemask, gc->depth));
 
 	if (FORCE_FALLBACK || !ACCEL_COPY_AREA || wedged(sna) ||
-	    !PM_IS_SOLID(dst, gc->planemask))
+	    !PM_IS_SOLID(dst, gc->planemask) || gc->depth < 8)
 		copy = sna_fallback_copy_boxes;
 	else if (src == dst)
 		copy = sna_self_copy_boxes;
commit 671658499bf432666a96b31ac96d2c66e2168c4c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 20 14:35:35 2014 +0000

    sna: Add some more DBG output around the clipping in sna_do_copy()
    
    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 40ae4c0..9378c67 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -5656,10 +5656,12 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 					   region, dx, dy,
 					   bitplane, closure);
 
-	DBG(("%s (boxes=%dx[(%d, %d), (%d, %d)...], src=+(%d, %d), alu=%d, src.size=%dx%d, dst.size=%dx%d)\n",
+	DBG(("%s (boxes=%dx[(%d, %d), (%d, %d)...], src=+(%d, %d), dst=+(%d, %d), alu=%d, src.size=%dx%d, dst.size=%dx%d)\n",
 	     __FUNCTION__, n,
 	     box[0].x1, box[0].y1, box[0].x2, box[0].y2,
-	     dx, dy, alu,
+	     dx, dy,
+	     get_drawable_dx(dst), get_drawable_dy(dst),
+	     alu,
 	     src_pixmap->drawable.width, src_pixmap->drawable.height,
 	     dst_pixmap->drawable.width, dst_pixmap->drawable.height));
 
@@ -6247,15 +6249,23 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	region.extents.y2 = bound(dy, height);
 	region.data = NULL;
 
-	DBG(("%s: dst extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+	DBG(("%s: dst extents (%d, %d), (%d, %d), dst clip extents (%d, %d), (%d, %d), dst size=%dx%d\n", __FUNCTION__,
 	     region.extents.x1, region.extents.y1,
-	     region.extents.x2, region.extents.y2));
+	     region.extents.x2, region.extents.y2,
+	     gc->pCompositeClip->extents.x1, gc->pCompositeClip->extents.y1,
+	     gc->pCompositeClip->extents.x2, gc->pCompositeClip->extents.y2,
+	     dst->width, dst->height));
 
 	if (!box_intersect(&region.extents, &gc->pCompositeClip->extents)) {
 		DBG(("%s: dst clipped out\n", __FUNCTION__));
 		return NULL;
 	}
 
+	DBG(("%s: clipped dst extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+	     region.extents.x1, region.extents.y1,
+	     region.extents.x2, region.extents.y2));
+	assert_drawable_contains_box(dst, &region.extents);
+
 	region.extents.x1 = clamp(region.extents.x1, sx - dx);
 	region.extents.x2 = clamp(region.extents.x2, sx - dx);
 	region.extents.y1 = clamp(region.extents.y1, sy - dy);
@@ -6264,6 +6274,10 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	src_extents = region.extents;
 	expose = true;
 
+	DBG(("%s: unclipped src extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+	     region.extents.x1, region.extents.y1,
+	     region.extents.x2, region.extents.y2));
+
 	if (region.extents.x1 < src->x)
 		region.extents.x1 = src->x;
 	if (region.extents.y1 < src->y)
commit 55a933aa29434f23674c851f02dce0ce983a0730
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 20 13:29:22 2014 +0000

    intel-virtual-output: Tidy some DBG for copying new modes
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 050bf1f..2539425 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1099,8 +1099,10 @@ static int context_update(struct context *ctx)
 			RRCrtc rr_crtc;
 			Status ret;
 
-			DBG(("%s: copying configuration from %s (mode=%ld) to %s\n",
-			     DisplayString(dst->dpy), src->name, (long)src->mode.id, dst->name));
+			DBG(("%s: copying configuration from %s (mode=%ld: %s) to %s\n",
+			     DisplayString(dst->dpy),
+			     src->name, (long)src->mode.id, src->mode.name,
+			     dst->name));
 
 			if (src->mode.id == 0) {
 err:
@@ -1140,8 +1142,10 @@ err:
 
 				id = XRRCreateMode(dst->dpy, dst->window, &m);
 				if (id) {
-					DBG(("%s(%s-%s): adding mode %ld: %s\n", __func__,
-					     DisplayString(dst->dpy), dst->name, (long)id, src->mode.name));
+					DBG(("%s: adding mode %ld: %s to %s\n",
+					     DisplayString(dst->dpy),
+					     (long)id, src->mode.name,
+					     dst->name));
 					XRRAddOutputMode(dst->dpy, dst->rr_output, id);
 					dst->mode.id = id;
 				} else {


More information about the xorg-commit mailing list