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

Chris Wilson ickle at kemper.freedesktop.org
Mon Jan 21 08:34:18 PST 2013


 src/sna/kgem.c |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 46a3a68e60a1d0a598ec8ece81088a4e6491de55
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 21 16:29:30 2013 +0000

    sna: Assert that if marked as a scanout it is indeed bound.
    
    On further review, the invariant must have been violated earlier, so
    make the assert earlier.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 47414be..c93d971 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1710,14 +1710,11 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
 	}
 
 	if (bo->scanout) {
-		if (bo->delta) {
-			DBG(("%s: handle=%d -> scanout\n",
-			     __FUNCTION__, bo->handle));
-			list_add(&bo->list, &kgem->scanout);
-			return;
-		}
-
-		kgem_bo_clear_scanout(kgem, bo);
+		assert (bo->delta);
+		DBG(("%s: handle=%d -> scanout\n",
+		     __FUNCTION__, bo->handle));
+		list_add(&bo->list, &kgem->scanout);
+		return;
 	}
 
 	if (!bo->reusable) {


More information about the xorg-commit mailing list