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

Chris Wilson ickle at kemper.freedesktop.org
Tue Jan 24 12:02:24 PST 2012


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

New commits:
commit aae19cbc5d0ddcf247451d06e063b2550a7ff16f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jan 24 19:58:29 2012 +0000

    sna: Only reset devPrivate.ptr if owned by the CPU bo when freeing
    
    If the pixmap is mapped to the GPU bo, we should continue to use the
    current mapping rather than revoke it. Otherwise if we write to the GPU
    bo inplace, thereby discarding the CPU bo, we set the pointer we are
    about to copy to, to NULL.
    
    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 6247fa6..46016e0 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -296,8 +296,9 @@ static void sna_pixmap_free_cpu(struct sna *sna, struct sna_pixmap *priv)
 	} else
 		free(priv->ptr);
 
-	priv->pixmap->devPrivate.ptr = priv->ptr = NULL;
-	priv->mapped = false;
+	priv->ptr = NULL;
+	if (!priv->mapped)
+		priv->pixmap->devPrivate.ptr = NULL;
 }
 
 static Bool sna_destroy_private(PixmapPtr pixmap, struct sna_pixmap *priv)


More information about the xorg-commit mailing list