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

Chris Wilson ickle at kemper.freedesktop.org
Wed Oct 3 14:55:49 PDT 2012


 src/sna/sna_accel.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b71af5dc626adfdf7d753e8e61fb13e8b9290d17
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Oct 3 22:53:57 2012 +0100

    sna: Clear sna_pixmap->cpu when destroying the CPU damage
    
    So that we keep the assertion checks that without CPU damage we can not
    be on the cpu.
    
    Reported-by: Clemens Eisserer <linuxhippy at gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55591
    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 2fb5529..5ebedad 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3012,8 +3012,10 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
 		priv->gpu_bo = NULL;
 	}
 
-	if ((flags & MOVE_READ) == 0)
+	if ((flags & MOVE_READ) == 0) {
 		sna_damage_destroy(&priv->cpu_damage);
+		priv->cpu = false;
+	}
 
 	sna_damage_reduce(&priv->cpu_damage);
 	assert_pixmap_damage(pixmap);
@@ -3065,6 +3067,7 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags)
 				       pixmap->drawable.height);
 			DBG(("%s: marking as all-damaged for GPU\n",
 			     __FUNCTION__));
+			assert(priv->cpu == false);
 			goto active;
 		}
 	}


More information about the xorg-commit mailing list