diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-15 11:06:59 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-15 11:06:59 +0000 |
commit | e3732a6f7f61a959521be9a668bba045591e633c (patch) | |
tree | bae17ce9545dad90bd84b1c42d0b85fc9db7bc90 /src | |
parent | 5df7147b0934dadc63459c2c0f33e0663692425a (diff) |
sna: Defer ring switching until after a period of idleness
Similar to the desire to flush the next batch after an overflow, we do
not want to incur any lag in the midst of drawing, even if that lag is
mitigated by GPU semaphores.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/kgem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 32d3fa0a..fd5679ae 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1107,7 +1107,7 @@ bool kgem_retire(struct kgem *kgem) } kgem->need_retire = !list_is_empty(&kgem->requests); - if (!kgem->need_retire && kgem->ring) + if (kgem->ring && (kgem->has_semaphores || !kgem->need_retire)) kgem->ring = kgem->mode; DBG(("%s -- need_retire=%d\n", __FUNCTION__, kgem->need_retire)); @@ -1412,8 +1412,6 @@ void kgem_reset(struct kgem *kgem) kgem->nbatch = 0; kgem->surface = kgem->max_batch_size; kgem->mode = KGEM_NONE; - if (kgem->has_semaphores) - kgem->ring = KGEM_NONE; kgem->flush = 0; kgem->scanout = 0; |