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

Chris Wilson ickle at kemper.freedesktop.org
Thu Apr 5 23:58:02 UTC 2018


 src/sna/sna_accel.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 84eaaba2737b2765f3fe843a138002ad0056a52b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Apr 6 00:56:45 2018 +0100

    sna: Add some debug output for clipping in stippled_1_blt
    
    Having just chased a bug along this path, I found the following debug
    helpful in a narrowing down why certain paths were chosen.
    
    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 8ee4ef76..2f669bcf 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -13732,10 +13732,10 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
 			uint8_t *dst, *src;
 			uint32_t *b;
 
-			DBG(("%s: rect (%d, %d)x(%d, %d) stipple [%d,%d]\n",
+			DBG(("%s: rect (%d, %d)x(%d, %d) stipple [%d,%d, src_stride=%d]\n",
 			     __FUNCTION__,
 			     r->x, r->y, r->width, r->height,
-			     bx1, bx2));
+			     bx1, bx2, bstride*bh));
 
 			src_stride = bstride*bh;
 			assert(src_stride > 0);
@@ -13898,6 +13898,12 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
 		if (!region_maybe_clip(&clip, gc->pCompositeClip))
 			return true;
 
+		DBG(("%s: clip.extents=[(%d, %d), (%d, %d)] region?=%d\n",
+		     __FUNCTION__,
+		     clip.extents.x1, clip.extents.y1,
+		     clip.extents.x2, clip.extents.y2,
+		     clip.data ? clip.data->numRects : 0));
+
 		pat.x = origin->x + drawable->x;
 		pat.y = origin->y + drawable->y;
 
@@ -13926,11 +13932,11 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
 				bh = box.y2 - box.y1;
 				bstride = ALIGN(bw, 2);
 
-				DBG(("%s: rect (%d, %d)x(%d, %d), box (%d,%d),(%d,%d) stipple [%d,%d], pitch=%d, stride=%d\n",
+				DBG(("%s: rect (%d, %d)x(%d, %d), box (%d,%d),(%d,%d) stipple [%d,%d], pitch=%d, stride=%d, len=%d\n",
 				     __FUNCTION__,
 				     r->x, r->y, r->width, r->height,
 				     box.x1, box.y1, box.x2, box.y2,
-				     bx1, bx2, bw, bstride));
+				     bx1, bx2, bw, bstride, bstride*bh));
 
 				src_stride = bstride*bh;
 				assert(src_stride > 0);
commit 846879ae2ec1050b72ac9ddb7c791300e22f6793
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Apr 6 00:54:33 2018 +0100

    sna: Fix the relocation dword for stippled_1_blt
    
    We were telling the kernel the correct location for it to fill the
    64b relocation, but we were writing the presumed offset into the wrong
    pair of dwords in the batch ourselves. For the frequent case where we
    used a new upload buffer, the kernel would perform the fixup and correct
    our mistake, but if we happened to reuse a buffer then we told the gpu
    to source the stipple from the wrong address.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105886
    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 e7e52003..8ee4ef76 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -14047,7 +14047,7 @@ sna_poly_fill_rect_stippled_1_blt(DrawablePtr drawable,
 										I915_GEM_DOMAIN_RENDER |
 										KGEM_RELOC_FENCED,
 										0);
-							*(uint64_t *)(b+5) =
+							*(uint64_t *)(b+6) =
 								kgem_add_reloc64(&sna->kgem, sna->kgem.nbatch + 6, upload,
 										I915_GEM_DOMAIN_RENDER << 16 |
 										KGEM_RELOC_FENCED,


More information about the xorg-commit mailing list