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

Chris Wilson ickle at kemper.freedesktop.org
Thu Aug 30 13:47:22 PDT 2012


 src/sna/kgem.c      |    3 +++
 src/sna/sna_accel.c |    2 +-
 src/sna/sna_dri.c   |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 00d8c776b3607dbdab32c1126f91a7a38b8065f6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 30 21:47:17 2012 +0100

    sna/dri: Hold a reference to the vsync blit
    
    Fixes regression from
    
    commit 96a921487ef00db03a12bec7b0821410d6b74c31
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Mon Aug 27 21:50:32 2012 +0100
    
        sna: Track outstanding requests per-ring
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ed5e342..6df5a2e 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1258,8 +1258,10 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
 {
 	DBG(("%s: moving handle=%d to inactive\n", __FUNCTION__, bo->handle));
 
+	assert(bo->refcnt == 0);
 	assert(bo->reusable);
 	assert(bo->rq == NULL);
+	assert(bo->exec == NULL);
 	assert(bo->domain != DOMAIN_GPU);
 	assert(!kgem_busy(kgem, bo->handle));
 	assert(!bo->proxy);
@@ -1544,6 +1546,7 @@ destroy:
 
 static void kgem_bo_unref(struct kgem *kgem, struct kgem_bo *bo)
 {
+	assert(bo->refcnt);
 	if (--bo->refcnt == 0)
 		__kgem_bo_destroy(kgem, bo);
 }
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 06a940b..5fa17d7 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -616,7 +616,7 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region,
 		if (flush) { /* STAT! */
 			struct kgem_request *rq = sna->kgem.next_request;
 			kgem_submit(&sna->kgem);
-			bo = rq->bo;
+			bo = kgem_bo_reference(rq->bo);
 		}
 	}
 
commit b2a6c74c2159c9968c19400d61a11f4773724b4a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Aug 29 14:51:40 2012 +0100

    sna: Remove inconsistent assertion
    
    As we now may not prefer to use the GPU even if all-damaged and clear,
    asserting that if we choose to use the CPU if clear is now bogus.
    
    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 9c493c2..090da91 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2379,6 +2379,7 @@ sna_drawable_use_bo(DrawablePtr drawable, unsigned flags, const BoxRec *box,
 	if (priv->gpu_bo && priv->gpu_bo->proxy) {
 		DBG(("%s: cached upload proxy, discard and revert to GPU\n",
 		     __FUNCTION__));
+		assert(priv->gpu_damage == NULL);
 		kgem_bo_destroy(&to_sna_from_pixmap(pixmap)->kgem,
 				priv->gpu_bo);
 		priv->gpu_bo = NULL;
@@ -2548,7 +2549,6 @@ use_gpu_bo:
 	return priv->gpu_bo;
 
 use_cpu_bo:
-	assert(!priv->clear);
 	if (priv->cpu_bo == NULL)
 		return NULL;
 


More information about the xorg-commit mailing list