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

Chris Wilson ickle at kemper.freedesktop.org
Mon Apr 23 03:11:16 PDT 2012


 src/sna/sna_dri.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8c58c840b1ba579a5601804fc710c58e1e00213f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Apr 23 11:09:37 2012 +0100

    sna/dri: Always clear the scanout when destroying dri2 buffers
    
    As we may end up holding onto and releasing the Screen pixmap last, we
    may also be responsible for flushing the last reference to the scanout.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index f4d55e0..1a7b6bd 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -333,6 +333,7 @@ static void _sna_dri_destroy_buffer(struct sna *sna, DRI2Buffer2Ptr buffer)
 		}
 
 		private->bo->flush = 0;
+		kgem_bo_clear_scanout(&sna->kgem, private->bo); /* paranoia */
 		kgem_bo_destroy(&sna->kgem, private->bo);
 
 		free(buffer);
@@ -388,6 +389,7 @@ static void set_bo(PixmapPtr pixmap, struct kgem_bo *bo)
 	sna_damage_destroy(&priv->cpu_damage);
 	priv->undamaged = false;
 
+	kgem_bo_clear_scanout(&sna->kgem, priv->gpu_bo); /* paranoia */
 	kgem_bo_destroy(&sna->kgem, priv->gpu_bo);
 	priv->gpu_bo = ref(bo);
 }


More information about the xorg-commit mailing list