diff options
author | Vinson Lee <vlee@freedesktop.org> | 2020-09-14 17:53:31 -0700 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-09-24 09:32:13 -0700 |
commit | 41d6216ddb8a727a82a1bec1bb2ba5c457ffb09e (patch) | |
tree | a57bd35da2bdc35d40881048eccc213f98a7bfc9 | |
parent | 22dd8299fede5b52afc38361b913c63925bea11d (diff) |
panfrost: Delete debug allocated syncobj.
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: drmSyncobjDestroy(dev->fd, ...
Fixes: 64d6f56ad26f ("panfrost: Allocate syncobjs in panfrost_flush")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6720>
(cherry picked from commit ffbdbd631ad9aa391f5160bf50d6849d98bb6de4)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/panfrost/pan_job.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 6d76eb538d9..613119b4c00 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1201,7 +1201,7 @@ "description": "panfrost: Delete debug allocated syncobj.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "64d6f56ad26f084a44a0f5491fc512a65d40df91" }, diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 93ee900b99d..8bda1651ea1 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -981,7 +981,7 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch, if (!out_sync && dev->debug & (PAN_DBG_TRACE | PAN_DBG_SYNC)) { drmSyncobjCreate(dev->fd, 0, &out_sync); - our_sync = false; + our_sync = true; } submit.out_sync = out_sync; @@ -1005,6 +1005,9 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch, if (dev->debug & PAN_DBG_MSGS) fprintf(stderr, "Error submitting: %m\n"); + if (our_sync) + drmSyncobjDestroy(dev->fd, out_sync); + return errno; } |