panfrost: signal syncobj if nothing is going to be flushed
authorIcenowy Zheng <icenowy@aosc.io>
Wed, 5 Aug 2020 20:48:05 +0000 (04:48 +0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 6 Aug 2020 13:16:25 +0000 (13:16 +0000)
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@aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>

src/gallium/drivers/panfrost/pan_job.c

index 3295d841602d52e4cf35913d45a15b2c90e46613..d59aa22f0494961e309ccc8ba767f72220700508 100644 (file)
@@ -1076,8 +1076,11 @@ panfrost_batch_submit(struct panfrost_batch *batch, uint32_t out_sync)
         int ret;
 
         /* Nothing to do! */
-        if (!batch->scoreboard.first_job && !batch->clear)
+        if (!batch->scoreboard.first_job && !batch->clear) {
+                if (out_sync)
+                        drmSyncobjSignal(dev->fd, &out_sync, 1);
                 goto out;
+       }
 
         panfrost_batch_draw_wallpaper(batch);