Mesa (staging/20.1): panfrost: signal syncobj if nothing is going to be flushed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 8 14:48:29 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 1ba42789df250c6c038ff9d7512b2171c2be7e3d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1ba42789df250c6c038ff9d7512b2171c2be7e3d

Author: Icenowy Zheng <icenowy at aosc.io>
Date:   Thu Aug  6 04:48:05 2020 +0800

panfrost: signal syncobj if nothing is going to be flushed

When nothing is going to be flushed, the kernel will get no job that
signals the syncobj.

Signal it by ourselves, otherwise it will never get signaled.

Closes: #3371

Signed-off-by: Icenowy Zheng <icenowy at aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>
(cherry picked from commit 9e397956b092543f5fc89ccc43dc309818c150c6)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/panfrost/pan_job.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 305bf66dd91..ea46a4e3a7a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -418,7 +418,7 @@
         "description": "panfrost: signal syncobj if nothing is going to be flushed",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 154ed833927..27745c742ee 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -984,6 +984,7 @@ static void
 panfrost_batch_submit(struct panfrost_batch *batch)
 {
         assert(batch);
+        struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
 
         /* Submit the dependencies first. */
         util_dynarray_foreach(&batch->dependencies,
@@ -996,6 +997,9 @@ panfrost_batch_submit(struct panfrost_batch *batch)
 
         /* Nothing to do! */
         if (!batch->first_job && !batch->clear) {
+                if (batch->out_sync->syncobj)
+                        drmSyncobjSignal(dev->fd, &batch->out_sync->syncobj, 1);
+
                 /* Mark the fence as signaled so the fence logic does not try
                  * to wait on it.
                  */



More information about the mesa-commit mailing list