sna: Explicitly retire any buffers underneath the static_request
If we are forced to use the static_request (reserved for allocation failure), we dispatch the execbuffer synchronously and expect no buffers to be present afterwards. Rather than just assert that this is so, we should clean up the buffer list! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
31d42ed563
commit
f0fd4d500d
|
|
@ -3091,7 +3091,6 @@ static bool __kgem_retire_rq(struct kgem *kgem, struct kgem_request *rq)
|
|||
}
|
||||
|
||||
bo->domain = DOMAIN_NONE;
|
||||
bo->gtt_dirty = false;
|
||||
bo->rq = NULL;
|
||||
if (bo->refcnt)
|
||||
continue;
|
||||
|
|
@ -3335,6 +3334,7 @@ static void kgem_commit(struct kgem *kgem)
|
|||
bo->binding.offset = 0;
|
||||
bo->domain = DOMAIN_GPU;
|
||||
bo->gpu_dirty = false;
|
||||
bo->gtt_dirty = false;
|
||||
|
||||
if (bo->proxy) {
|
||||
/* proxies are not used for domain tracking */
|
||||
|
|
@ -3358,6 +3358,23 @@ static void kgem_commit(struct kgem *kgem)
|
|||
kgem_throttle(kgem);
|
||||
}
|
||||
|
||||
while (!list_is_empty(&rq->buffers)) {
|
||||
bo = list_first_entry(&rq->buffers,
|
||||
struct kgem_bo,
|
||||
request);
|
||||
|
||||
assert(RQ(bo->rq) == rq);
|
||||
assert(bo->exec == NULL);
|
||||
assert(bo->domain == DOMAIN_GPU);
|
||||
|
||||
list_del(&bo->request);
|
||||
bo->domain = DOMAIN_NONE;
|
||||
bo->rq = NULL;
|
||||
|
||||
if (bo->refcnt == 0)
|
||||
_kgem_bo_destroy(kgem, bo);
|
||||
}
|
||||
|
||||
kgem_retire(kgem);
|
||||
assert(list_is_empty(&rq->buffers));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue