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

Chris Wilson ickle at kemper.freedesktop.org
Tue Mar 5 05:49:58 PST 2013


 src/sna/sna_accel.c |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 99b30203ba1c26d89d869691a743488a5dc32935
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Mar 5 13:45:45 2013 +0000

    sna: Fix deference of just nullified GPU bo in previous commit
    
    One last minute refactor too far, combining the too if(priv->gpu_bo)
    blocks forgot that the first block tried to free gpu_bo...
    
    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 a2e5be3..700eaa8 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1397,19 +1397,18 @@ sna_pixmap_create_mappable_gpu(PixmapPtr pixmap,
 
 	assert_pixmap_damage(pixmap);
 
-	if (priv->gpu_bo) {
-		if (can_replace &&
-		    (!kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo) ||
-		     __kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))) {
-			if (priv->pinned)
-				return false;
+	if (can_replace && priv->gpu_bo &&
+	    (!kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo) ||
+	     __kgem_bo_is_busy(&sna->kgem, priv->gpu_bo))) {
+		if (priv->pinned)
+			return false;
 
-			DBG(("%s: discard busy GPU bo\n", __FUNCTION__));
-			sna_pixmap_free_gpu(sna, priv);
-		}
+		DBG(("%s: discard busy GPU bo\n", __FUNCTION__));
+		sna_pixmap_free_gpu(sna, priv);
+	}
 
+	if (priv->gpu_bo)
 		return kgem_bo_is_mappable(&sna->kgem, priv->gpu_bo);
-	}
 
 	assert_pixmap_damage(pixmap);
 


More information about the xorg-commit mailing list