Mesa (main): v3d: print error on perfmon destroy error
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 13:45:59 UTC 2021
Module: Mesa
Branch: main
Commit: 91a5afcd5f03efbbea5f84e6f890677f5aab6ff1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a5afcd5f03efbbea5f84e6f890677f5aab6ff1
Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date: Mon Aug 9 10:36:17 2021 +0200
v3d: print error on perfmon destroy error
Print an error in case destroying the kernel perfmon fails.
Fixes CID 1489964: Error handling issues (CHECKED_RETURN).
v2:
- Wrap line (Iago).
Fixes: 685281278eb ("v3d: implement performance counter queries")
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12280>
---
src/gallium/drivers/v3d/v3d_query_perfcnt.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/v3d/v3d_query_perfcnt.c b/src/gallium/drivers/v3d/v3d_query_perfcnt.c
index 02aa170e8d9..793f99d4dc0 100644
--- a/src/gallium/drivers/v3d/v3d_query_perfcnt.c
+++ b/src/gallium/drivers/v3d/v3d_query_perfcnt.c
@@ -133,7 +133,10 @@ kperfmon_destroy(struct v3d_context *v3d, struct v3d_perfmon_state *perfmon)
struct drm_v3d_perfmon_destroy destroyreq;
destroyreq.id = perfmon->kperfmon_id;
- v3d_ioctl(v3d->fd, DRM_IOCTL_V3D_PERFMON_DESTROY, &destroyreq);
+ int ret = v3d_ioctl(v3d->fd, DRM_IOCTL_V3D_PERFMON_DESTROY, &destroyreq);
+ if (ret != 0)
+ fprintf(stderr, "failed to destroy perfmon %d: %s\n",
+ perfmon->kperfmon_id, strerror(errno));
}
int
More information about the mesa-commit
mailing list