xf86-video-intel: src/sna/sna_io.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jun 2 02:34:15 PDT 2014


 src/sna/sna_io.c |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

New commits:
commit d6a412812c19fe4698752d2589ead4965048b107
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 2 10:32:11 2014 +0100

    sna: Use CPU mmappings for linear uploads
    
    The other half of the commit that accidentally got included with
    
    commit bb49222a514b1d6041f3d9530a22f5701377118b
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Mon Jun 2 08:25:52 2014 +0100
    
        sna: Add DBG hints for using inplace CPU mmappings
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index c71435a..f464dce 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -659,7 +659,7 @@ write_boxes_inplace__tiled(struct kgem *kgem,
 	uint8_t *dst;
 
 	assert(kgem_bo_can_map__cpu(kgem, bo, true));
-	assert(bo->tiling == I915_TILING_X);
+	assert(bo->tiling != I915_TILING_Y);
 
 	dst = kgem_bo_map__cpu(kgem, bo);
 	if (dst == NULL)
@@ -670,13 +670,23 @@ write_boxes_inplace__tiled(struct kgem *kgem,
 	if (sigtrap_get())
 		return false;
 
-	do {
-		memcpy_to_tiled_x(kgem, src, dst, bpp, stride, bo->pitch,
-				  box->x1 + src_dx, box->y1 + src_dy,
-				  box->x1 + dst_dx, box->y1 + dst_dy,
-				  box->x2 - box->x1, box->y2 - box->y1);
-		box++;
-	} while (--n);
+	if (bo->tiling) {
+		do {
+			memcpy_to_tiled_x(kgem, src, dst, bpp, stride, bo->pitch,
+					  box->x1 + src_dx, box->y1 + src_dy,
+					  box->x1 + dst_dx, box->y1 + dst_dy,
+					  box->x2 - box->x1, box->y2 - box->y1);
+			box++;
+		} while (--n);
+	} else {
+		do {
+			memcpy_blt(src, dst, bpp, stride, bo->pitch,
+				   box->x1 + src_dx, box->y1 + src_dy,
+				   box->x1 + dst_dx, box->y1 + dst_dy,
+				   box->x2 - box->x1, box->y2 - box->y1);
+			box++;
+		} while (--n);
+	}
 
 	sigtrap_put();
 	return true;


More information about the xorg-commit mailing list