From 6320e4672fd99d1df470214ba9a1e965a3f15f98 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Thu, 6 Aug 2020 04:48:05 +0800 Subject: [PATCH] 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 Reviewed-by: Alyssa Rosenzweig Cc: mesa-stable Part-of: (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 0f4ef1a25bf..188ef6354d0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 }, 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. */