diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-12 00:58:08 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-12 02:16:49 +0000 |
commit | b09ae4c20313fea7af11f77cd673039635d4dcc7 (patch) | |
tree | de1e5bbfc1f7b144b95ebf06de5e6a923e3e6fee | |
parent | a3c42565a8f557b2e7f7ff7bfa45b13b606f2968 (diff) |
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 <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 7 |
1 files changed, 1 insertions, 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); } |