summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_job.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-01-26 10:34:42 -0800
committerEric Anholt <eric@anholt.net>2016-01-27 20:05:37 -0800
commit3fba517bdd03551f7c7ff21dfe1896c677cbccda (patch)
treec652d951d84670ab6c188a6eb93ad190dd7bf2bf /src/gallium/drivers/vc4/vc4_job.c
parent2a449ce7c961f3269f9a37ddf4fe340fc170c609 (diff)
downloadexternal_mesa3d-3fba517bdd03551f7c7ff21dfe1896c677cbccda.zip
external_mesa3d-3fba517bdd03551f7c7ff21dfe1896c677cbccda.tar.gz
external_mesa3d-3fba517bdd03551f7c7ff21dfe1896c677cbccda.tar.bz2
vc4: Throttle outstanding rendering after submission.
Just make sure that after we've submitted, we get to at least 5 (global) submits ago before we go on to do more. Prevents up to seconds of lag with window movement in X with xcompmgr -c. There may be useful tuning to do in the future, but for now this gets us usability. Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_job.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_job.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c
index e7b52e3..41660f6 100644
--- a/src/gallium/drivers/vc4/vc4_job.c
+++ b/src/gallium/drivers/vc4/vc4_job.c
@@ -250,6 +250,15 @@ vc4_job_submit(struct vc4_context *vc4)
}
}
+ if (vc4->last_emit_seqno - vc4->screen->finished_seqno > 5) {
+ if (!vc4_wait_seqno(vc4->screen,
+ vc4->last_emit_seqno - 5,
+ PIPE_TIMEOUT_INFINITE,
+ "job throttling")) {
+ fprintf(stderr, "Job throttling failed\n");
+ }
+ }
+
if (vc4_debug & VC4_DEBUG_ALWAYS_SYNC) {
if (!vc4_wait_seqno(vc4->screen, vc4->last_emit_seqno,
PIPE_TIMEOUT_INFINITE, "sync")) {