xf86-video-intel: 3 commits - src/sna/sna_accel.c src/sna/sna_display.c test/README

Chris Wilson ickle at kemper.freedesktop.org
Mon Sep 1 09:10:39 PDT 2014


 src/sna/sna_accel.c   |   14 ++++++++++++--
 src/sna/sna_display.c |   11 ++++++-----
 test/README           |    4 ++--
 3 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit 407817ebb9129f1b946c7ba68e3e05d9540f478c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 1 17:02:44 2014 +0100

    sna: Reject invalid CopyArea based on source clipping earlier
    
    Given a ridiculous CopyArea, say copying from (-32000,-32000), the
    region extents will wrap around when translated before the final clip
    and reject test. To overcome this, do source based rejection earlier
    before the potential underflow.
    
    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 68e2de6..52c5a90 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6880,6 +6880,14 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	if (region.extents.y2 > src->y + (int) src->height)
 		region.extents.y2 = src->y + (int) src->height;
 
+	DBG(("%s: clipped src extents (%d, %d), (%d, %d)\n", __FUNCTION__,
+	     region.extents.x1, region.extents.y1,
+	     region.extents.x2, region.extents.y2));
+	if (box_empty(&region.extents)) {
+		DBG(("%s: src clipped out\n", __FUNCTION__));
+		return NULL;
+	}
+
 	/* Compute source clip region */
 	if (src->type == DRAWABLE_PIXMAP) {
 		if (src == dst && gc->clientClipType == CT_NONE) {
@@ -6921,10 +6929,12 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	RegionTranslate(&region, dx-sx, dy-sy);
 	if (gc->pCompositeClip->data)
 		RegionIntersect(&region, &region, gc->pCompositeClip);
-	DBG(("%s: copy region (%d, %d), (%d, %d) x %d\n", __FUNCTION__,
+	DBG(("%s: copy region (%d, %d), (%d, %d) x %d + (%d, %d)\n",
+	     __FUNCTION__,
 	     region.extents.x1, region.extents.y1,
 	     region.extents.x2, region.extents.y2,
-	     region_num_rects(&region)));
+	     region_num_rects(&region),
+	     sx-dx, sy-dy));
 
 	if (!box_empty(&region.extents))
 		copy(src, dst, gc, &region, sx-dx, sy-dy, bitPlane, closure);
commit 92b37783eb2e9166efd82325f14d05de6a082081
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 1 15:05:05 2014 +0100

    test/README: Add missing trailing characters from cut'n'paste
    
    When copying the command from the terminal I failed to highlight the
    last character.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/README b/test/README
index bd5aec9..1bb3d7d 100644
--- a/test/README
+++ b/test/README
@@ -5,7 +5,7 @@ drawing commands and more explicit checking of the acceleration paths.
 Useful tools:
 
 # Packed YUV Xv tester
-gst-launch-1.0 videotestsrc pattern=snow ! 'video/x-raw,format=UYVY,width=640,height=360' ! xvimagesin
+gst-launch-1.0 videotestsrc pattern=snow ! 'video/x-raw,format=UYVY,width=640,height=360' ! xvimagesink
 
 # Planar YUV Xv tester
-gst-launch-1.0 videotestsrc pattern=snow ! 'video/x-raw,format=I420,width=640,height=360' ! xvimagesin
+gst-launch-1.0 videotestsrc pattern=snow ! 'video/x-raw,format=I420,width=640,height=360' ! xvimagesink
commit ab01c1211e40f788fb2970ad03930bbaa92e58d4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Sep 1 13:37:30 2014 +0100

    sna: Fallback to normal composite if the blt redisplay fails
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index d162def..a1a8782 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6533,11 +6533,12 @@ sna_crtc_redisplay(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo *bo)
 			transformed_box(&whole.extents, crtc);
 			region = &whole;
 		}
-		sna_blt_fill_boxes(sna, GXcopy,
-				   bo, draw->bitsPerPixel,
-				   priv->clear_color,
-				   region_rects(region), region_num_rects(region));
-		return;
+		if (sna_blt_fill_boxes(sna, GXcopy,
+				       bo, draw->bitsPerPixel,
+				       priv->clear_color,
+				       region_rects(region),
+				       region_num_rects(region)))
+			return;
 	}
 
 	if (crtc->filter == NULL &&


More information about the xorg-commit mailing list