summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-12 00:58:08 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-12 02:16:49 +0000
commitb09ae4c20313fea7af11f77cd673039635d4dcc7 (patch)
treede1e5bbfc1f7b144b95ebf06de5e6a923e3e6fee
parenta3c42565a8f557b2e7f7ff7bfa45b13b606f2968 (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.c7
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);
}