[igt-dev] [PATCH i-g-t 2/2] tests/vc4_perfmon: Make sure vc4 supports perfmon
Maíra Canal
mcanal at igalia.com
Tue Jan 3 11:18:20 UTC 2023
Performance Monitors for the vc4 were introduced in Linux 4.17, so a
check if vc4 supports Performance Monitors is essential to assure that
the tests will perform correctly. Therefore, check if vc4 has
perfmon support before running the tests.
Signed-off-by: Maíra Canal <mcanal at igalia.com>
---
tests/vc4/vc4_perfmon.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/vc4/vc4_perfmon.c b/tests/vc4/vc4_perfmon.c
index 30186519..22a2d033 100644
--- a/tests/vc4/vc4_perfmon.c
+++ b/tests/vc4/vc4_perfmon.c
@@ -13,8 +13,13 @@ igt_main
int fd;
igt_fixture {
+ uint64_t val = 0;
+
fd = drm_open_driver(DRIVER_VC4);
igt_require(igt_vc4_is_v3d(fd));
+
+ igt_vc4_get_param(fd, DRM_VC4_PARAM_SUPPORTS_PERFMON, &val);
+ igt_require(val);
}
igt_describe("Make sure a perfmon cannot be created with zero counters.");
--
2.38.1
More information about the igt-dev
mailing list