summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-12-31 10:10:00 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-12-31 15:36:17 +0000
commit281425551bdab7eb38ae167a3205b14ae3599c49 (patch)
tree25990ca45e18ab4b2df62531af4abacdc9478d7c /src
parent2f5448f1329f344702e4e29b2509d7190677bbf0 (diff)
sna: Tweak throttling to be run before going idle
The goal is to avoid introducing extra latency in the middle of a command sequence and to delay it until we have to wait for the clients. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 85bddd0a..fd67143b 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -9182,7 +9182,7 @@ static bool sna_accel_flush(struct sna *sna)
sna->kgem.busy = !nothing_to_do;
kgem_bo_flush(&sna->kgem, priv->gpu_bo);
sna->kgem.flush_now = 0;
- return need_throttle;
+ return need_throttle && !sna->kgem.busy;
}
static void sna_accel_expire(struct sna *sna)
@@ -9463,9 +9463,6 @@ static void sna_accel_throttle(struct sna *sna)
if (sna->flags & SNA_NO_THROTTLE)
return;
- if (list_is_empty(&sna->kgem.requests))
- return;
-
DBG(("%s (time=%ld)\n", __FUNCTION__, (long)GetTimeInMillis()));
kgem_throttle(&sna->kgem);