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

Chris Wilson ickle at kemper.freedesktop.org
Tue Jun 17 14:48:46 PDT 2014


 src/sna/sna_accel.c   |   30 ++++++++++++++++++------------
 src/sna/sna_display.c |    1 -
 2 files changed, 18 insertions(+), 13 deletions(-)

New commits:
commit d49f53cc00258e3b1e1a898c02e219b336716002
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 17 22:23:02 2014 +0100

    sna: Fix computing source bo for BLT operations
    
    If we migrate the pixmap to the GPU, use the GPU bo. This may fix an issue
    where we might end up using the CPU bo in a rare circumstance.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=80033
    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 51b17fe..61f167a 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -11828,12 +11828,18 @@ sna_pixmap_get_source_bo(PixmapPtr pixmap)
 		return upload;
 	}
 
-	if (priv->gpu_damage &&
-	    !sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_ASYNC_HINT))
-		return NULL;
-
-	if (priv->cpu_damage && priv->cpu_bo)
-		return kgem_bo_reference(priv->cpu_bo);
+	if (priv->gpu_damage) {
+		if (sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_ASYNC_HINT))
+			return kgem_bo_reference(priv->gpu_bo);
+	} else if (priv->cpu_damage) {
+		if (priv->cpu_bo)
+			return kgem_bo_reference(priv->cpu_bo);
+	} else {
+		if (priv->gpu_bo)
+			return kgem_bo_reference(priv->gpu_bo);
+		if (priv->cpu_bo)
+			return kgem_bo_reference(priv->cpu_bo);
+	}
 
 	if (!sna_pixmap_move_to_gpu(pixmap, MOVE_READ | MOVE_ASYNC_HINT)) {
 		struct kgem_bo *upload;
commit 475562d713a00e2f60f7ca067d753fd965d71717
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 17 22:25:05 2014 +0100

    sna: Align some function parameters
    
    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 bd21380..51b17fe 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -11443,7 +11443,7 @@ sna_poly_fill_rect_blt(DrawablePtr drawable,
 		       struct kgem_bo *bo,
 		       struct sna_damage **damage,
 		       GCPtr gc, uint32_t pixel,
-		       int n, xRectangle *rect,
+		       int n, const xRectangle *rect,
 		       const BoxRec *extents,
 		       bool clipped)
 {
@@ -12398,12 +12398,12 @@ sna_poly_fill_rect_tiled_blt(DrawablePtr drawable,
 			return true;
 		}
 	} else {
-		if ((tile->drawable.width | tile->drawable.height) <= 0xc &&
-				is_power_of_two(tile->drawable.width) &&
-				is_power_of_two(tile->drawable.height))
+		if ((tile->drawable.width | tile->drawable.height) <= 0xf &&
+		    is_power_of_two(tile->drawable.width) &&
+		    is_power_of_two(tile->drawable.height))
 			return sna_poly_fill_rect_tiled_nxm_blt(drawable, bo, damage,
-					gc, n, rect,
-					extents, clipped);
+								gc, n, rect,
+								extents, clipped);
 
 		tile_bo = sna_pixmap_get_source_bo(tile);
 		if (tile_bo == NULL) {
commit c91fc0aad843ffc2660f6a3bf9b875d190e0b0dd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jun 17 17:06:05 2014 +0100

    sna: Remove invalid assert
    
    Present and flip fallback may queue self-flips, so the assertion that
    the crtc->flip_bo != crtc->bo is false.
    
    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 5f32978..0c0ae8a 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6438,7 +6438,6 @@ void sna_mode_wakeup(struct sna *sna)
 				assert(crtc->flip_bo);
 				assert(crtc->flip_bo->active_scanout);
 				assert(crtc->flip_bo->refcnt >= crtc->flip_bo->active_scanout);
-				assert(crtc->flip_bo != crtc->bo);
 
 				if (crtc->bo) {
 					DBG(("%s: removing handle=%d from scanout, installing handle=%d\n",


More information about the xorg-commit mailing list