From a3a075201c8e47cfad6ec296b7baf549deb44cb3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 21 Oct 2011 15:30:52 +0100 Subject: 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 --- src/sna/kgem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index d5084f87..6f98f273 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -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)); } -- cgit v1.2.3