Mesa (master): panfrost: Delete debug allocated syncobj.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 17 23:23:41 UTC 2020
Module: Mesa
Branch: master
Commit: ffbdbd631ad9aa391f5160bf50d6849d98bb6de4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffbdbd631ad9aa391f5160bf50d6849d98bb6de4
Author: Vinson Lee <vlee at freedesktop.org>
Date: Mon Sep 14 17:53:31 2020 -0700
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 at freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6720>
---
src/gallium/drivers/panfrost/pan_job.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 7db9ce936a5..5154a560048 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -970,7 +970,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;
@@ -1003,6 +1003,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;
}
More information about the mesa-commit
mailing list