sna: Use more explicit retire-requests after syncing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-03-31 15:01:10 +01:00
parent 8b358076f2
commit 68632e1000
1 changed files with 7 additions and 14 deletions

View File

@ -299,6 +299,7 @@ static void assert_bo_retired(struct kgem_bo *bo)
assert(bo->refcnt);
assert(bo->rq == NULL);
assert(bo->exec == NULL);
assert(!bo->needs_flush);
assert(list_is_empty(&bo->request));
}
#else
@ -639,16 +640,10 @@ static void kgem_bo_retire(struct kgem *kgem, struct kgem_bo *bo)
assert(bo->exec == NULL);
assert(list_is_empty(&bo->vma));
if (bo->rq) {
__kgem_bo_clear_busy(bo);
kgem_retire(kgem);
assert_bo_retired(bo);
} else {
assert(bo->exec == NULL);
assert(list_is_empty(&bo->request));
assert(!bo->needs_flush);
ASSERT_IDLE(kgem, bo->handle);
}
if (bo->rq)
__kgem_retire_requests_upto(kgem, bo);
ASSERT_IDLE(kgem, bo->handle);
assert_bo_retired(bo);
}
static void kgem_bo_maybe_retire(struct kgem *kgem, struct kgem_bo *bo)
@ -660,10 +655,8 @@ static void kgem_bo_maybe_retire(struct kgem *kgem, struct kgem_bo *bo)
assert(list_is_empty(&bo->vma));
if (bo->rq) {
if (!__kgem_busy(kgem, bo->handle)) {
__kgem_bo_clear_busy(bo);
kgem_retire(kgem);
}
if (!__kgem_busy(kgem, bo->handle))
__kgem_retire_requests_upto(kgem, bo);
} else {
assert(!bo->needs_flush);
ASSERT_IDLE(kgem, bo->handle);