xf86-video-intel: 2 commits - src/sna/kgem.c src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 13 02:31:42 PDT 2012


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

New commits:
commit ab3b7fe31b5a9d7924e959f21d29c4f7352ec8cb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 13 10:35:14 2012 +0100

    sna: Only reuse a write buffer if all external references have been dropped
    
    This avoids the unhappy situation of overwriting an upload buffer that
    we intend to use for a fallback.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 0c7b56c..8d7b1d6 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3651,7 +3651,8 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
 		/* We can reuse any write buffer which we can fit */
 		if (flags == KGEM_BUFFER_LAST &&
 		    bo->write == KGEM_BUFFER_WRITE &&
-		    !bo->mmapped && size <= bytes(&bo->base)) {
+		    bo->base.refcnt == 1 && !bo->mmapped &&
+		    size <= bytes(&bo->base)) {
 			DBG(("%s: reusing write buffer for read of %d bytes? used=%d, total=%d\n",
 			     __FUNCTION__, size, bo->used, bytes(&bo->base)));
 			gem_write(kgem->fd, bo->base.handle,
commit e8cb656dc4bab1489df9dfb4cb64704b2a9fa34b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 13 08:10:10 2012 +0100

    sna: Free clip intersection with line extents after use
    
    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 8498b3c..e39f4a4 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -6238,6 +6238,7 @@ Y2_continue:
 
 done:
 	fill.done(sna, &fill);
+	RegionUninit(&clip);
 	return true;
 
 damage:
@@ -7402,6 +7403,7 @@ Y2_continue:
 
 done:
 	fill.done(sna, &fill);
+	RegionUninit(&clip);
 	return true;
 
 damage:


More information about the xorg-commit mailing list