From b09ae4c20313fea7af11f77cd673039635d4dcc7 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 12 Jan 2012 00:58:08 +0000 Subject: [PATCH] sna: Don't drop expired partial bo immediately, wait until dispatch As the partial bo may be coupled into the execlist, we may as well hang onto the memory to service the next partial buffer request until it expires in the next dispatch. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index f5c3cfba..45700ea3 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2335,12 +2335,7 @@ static void _kgem_bo_delete_partial(struct kgem *kgem, struct kgem_bo *bo) DBG(("%s: size=%d, offset=%d, parent used=%d\n", __FUNCTION__, bo->size, bo->delta, io->used)); - if (bo->size == io->used) { - assert(io->base.exec == NULL); - assert(io->base.refcnt >= 2); - list_del(&io->base.list); - --io->base.refcnt; - } else if (bo->delta + bo->size == io->used) { + if (bo->delta + bo->size == io->used) { io->used = bo->delta; bubble_sort_partial(kgem, io); }