summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-08 00:57:12 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-08 00:58:38 +0000
commit4899740f6f0f5b1a5b2b3490502ccdeb7b092877 (patch)
tree700c4b4fa3ea0417eb3fff38d651824f11683162
parent72a7538d4e7bcf0bd7455d9e67d8751e17739e6c (diff)
sna: Do not reset partial buffers if they are not attached to the current batch
As we may be holding on to them as an active mapping whilst they are executing; reseting the used counter back to zero in this case can cause corruption. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index e4dcbb2f..8e3de97a 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1464,10 +1464,6 @@ static void kgem_finish_partials(struct kgem *kgem)
assert(bo->base.refcnt >= 1);
if (!bo->base.exec) {
- if (bo->base.refcnt == 1 && bo->used) {
- bo->used = 0;
- bubble_sort_partial(&kgem->active_partials, bo);
- }
DBG(("%s: skipping unattached handle=%d, used=%d\n",
__FUNCTION__, bo->base.handle, bo->used));
continue;