Mesa (master): panfrost: Split up batches with many jobs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Dec 16 21:58:12 UTC 2020


Module: Mesa
Branch: master
Commit: e541aa76e298bde494180ccd22c1cbf45f2b95f7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e541aa76e298bde494180ccd22c1cbf45f2b95f7

Author: Icecream95 <ixn at disroot.org>
Date:   Wed Dec 16 22:57:22 2020 +1300

panfrost: Split up batches with many jobs

If there are too many jobs in a batch, split it. Although the GPU
theoretically supports 65536 jobs in a batch, set the threshold lower
to avoid GPU timeouts.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8130>

---

 src/gallium/drivers/panfrost/pan_context.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 1e033a7ab6d..4955eac39ba 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -493,6 +493,11 @@ panfrost_draw_vbo(
         /* Now that we have a guaranteed terminating path, find the job. */
 
         struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
+
+        /* Don't add too many jobs to a single batch */
+        if (batch->scoreboard.job_index > 10000)
+                batch = panfrost_get_fresh_batch_for_fbo(ctx);
+
         panfrost_batch_set_requirements(batch);
 
         /* Take into account a negative bias */



More information about the mesa-commit mailing list