sna: Treat a bo marked as being last seen on the GPU as requiring a flush

We are hitting this path upon retiring the old scanout buffer following
a page-flip. We want to treat this as being hot and available for reuse,
so mark it as such until the next retirement pass.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-21 15:30:52 +01:00
parent 999d13f321
commit a3a075201c
1 changed files with 1 additions and 2 deletions

View File

@ -564,12 +564,11 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
kgem->need_expire = true;
if (bo->rq) {
list_move(&bo->list, active(kgem, bo->size));
} else if (bo->needs_flush) {
} else if (bo->needs_flush | bo->gpu) {
assert(list_is_empty(&bo->request));
list_add(&bo->request, &kgem->flushing);
list_move(&bo->list, active(kgem, bo->size));
} else {
assert(bo->gpu == 0);
list_move(&bo->list, inactive(kgem, bo->size));
}