xf86-video-intel: src/sna/kgem.h

Chris Wilson ickle at kemper.freedesktop.org
Tue Feb 4 10:09:16 PST 2014


 src/sna/kgem.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0906769c1b92520351729c4d8f2ab684d3ddf2eb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 4 17:51:51 2014 +0000

    sna: Rearrange assertion to ease use of substitute cached bo
    
    Since we call kgem_bo_submit() along one path when synchronising a
    cached bo (which is known to be inactive) but still want to keep the
    assertion on the refcnt, simply rearrange the code to only assert on the
    active path.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=73406
    Reported-by: Matti Hamalainen <ccr at tnsp.org>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index 4c4996f..fdabd50 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -343,9 +343,11 @@ static inline void kgem_submit(struct kgem *kgem)
 
 static inline void kgem_bo_submit(struct kgem *kgem, struct kgem_bo *bo)
 {
+	if (bo->exec == NULL)
+		return;
+
 	assert(bo->refcnt);
-	if (bo->exec)
-		_kgem_submit(kgem);
+	_kgem_submit(kgem);
 }
 
 void kgem_scanout_flush(struct kgem *kgem, struct kgem_bo *bo);


More information about the xorg-commit mailing list