summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-12-04 11:16:58 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-12-04 11:16:58 +0000
commit594470c809627feab4891bade5ec6d80e1d0a919 (patch)
tree1103ca8cdd71f6feaa6e8456e39a82b0697f429f /src/sna
parent9c2c485df9fd39ae36779f765a892e36835a8001 (diff)
sna: Update the fence marker after submitting a new batch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/kgem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index bea2295f..78ed5407 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -2967,6 +2967,10 @@ static void kgem_commit(struct kgem *kgem)
assert(rq->ring < ARRAY_SIZE(kgem->requests));
list_add_tail(&rq->list, &kgem->requests[rq->ring]);
kgem->need_throttle = kgem->need_retire = 1;
+
+ if (kgem->fence[rq->ring] == NULL &&
+ __kgem_busy(kgem, rq->bo->handle))
+ kgem->fence[rq->ring] = rq;
}
kgem->next_request = NULL;