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

Chris Wilson ickle at kemper.freedesktop.org
Wed Apr 24 08:12:41 PDT 2013


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

New commits:
commit 8eaafdb43998b5cdefb20b8098c558fa5decb115
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Apr 24 15:48:14 2013 +0100

    sna: Prevent accessing an uninitialised region in move_area_to_gpu()
    
    If we skip the migration, we need to avoid using the unitialiased
    region. There is no bad consequence as both branches of the if are
    no-ops, but it does silence the static checkers and should make the
    predicate cheaper.
    
    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 02b0a44..43a6d70 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2651,7 +2651,8 @@ done:
 	if (flags & MOVE_WRITE) {
 		priv->clear = false;
 		priv->cpu = false;
-		if (priv->cpu_damage == NULL &&
+		if (!DAMAGE_IS_ALL(priv->gpu_damage) &&
+		    priv->cpu_damage == NULL &&
 		    box_inplace(pixmap, &r.extents)) {
 			DBG(("%s: large operation on undamaged, promoting to full GPU\n",
 			     __FUNCTION__));


More information about the xorg-commit mailing list