From 46a3a68e60a1d0a598ec8ece81088a4e6491de55 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 21 Jan 2013 16:29:30 +0000 Subject: [PATCH] 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 --- src/sna/kgem.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 47414be2..c93d9714 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) {