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@aosc.io>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6190>
(cherry picked from commit 9e397956b0)
This commit is contained in:
Icenowy Zheng 2020-08-06 04:48:05 +08:00 committed by Eric Engestrom
parent e99e81ecea
commit 6320e4672f
2 changed files with 5 additions and 1 deletions

View file

@ -4207,7 +4207,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
},

View file

@ -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.
*/