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@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-01-21 16:29:30 +00:00
parent 0507d55dd1
commit 46a3a68e60
1 changed files with 5 additions and 8 deletions

View File

@ -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) {