sna: Stage retirement through the flushing list
If the kernel replies that a bo is still busy, stage its retirement through the flushing list to be certain that we never stall on a subsequent write. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
5f5711e62c
commit
033f75e5bd
|
|
@ -396,17 +396,23 @@ static void kgem_bo_retire(struct kgem *kgem, struct kgem_bo *bo)
|
|||
__FUNCTION__, bo->handle, bo->needs_flush, bo->rq != NULL,
|
||||
kgem_busy(kgem, bo->handle)));
|
||||
assert(bo->exec == NULL);
|
||||
ASSERT_IDLE(kgem, bo->handle);
|
||||
assert(list_is_empty(&bo->vma));
|
||||
|
||||
if (bo->rq) {
|
||||
kgem_retire(kgem);
|
||||
bo->rq = NULL;
|
||||
if (bo->needs_flush)
|
||||
bo->needs_flush = kgem_busy(kgem, bo->handle);
|
||||
if (bo->needs_flush) {
|
||||
list_move(&bo->request, &kgem->flushing);
|
||||
bo->rq = (void *)kgem;
|
||||
} else {
|
||||
bo->rq = NULL;
|
||||
list_del(&bo->request);
|
||||
kgem_retire(kgem);
|
||||
}
|
||||
} else {
|
||||
assert(!bo->needs_flush);
|
||||
ASSERT_IDLE(kgem, bo->handle);
|
||||
}
|
||||
|
||||
assert(list_is_empty(&bo->vma));
|
||||
list_del(&bo->request);
|
||||
|
||||
bo->needs_flush = false;
|
||||
}
|
||||
|
||||
bool kgem_bo_write(struct kgem *kgem, struct kgem_bo *bo,
|
||||
|
|
|
|||
Loading…
Reference in New Issue