[igt-dev] [i-g-t v2] tests/i915/perf: Added check for testcase to get discarded on less than gen12 platform

Anand Moon anandx.ram.moon at intel.com
Fri Mar 26 09:03:26 UTC 2021


Added check for testcase to get discarded on less than gen12 platform

v2: Added check in gen12 sub testcase to return.

Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Signed-off-by: Anand Moon <anandx.ram.moon at intel.com>
---
 tests/i915/perf.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index 664fd0a9..b78a714e 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -2389,6 +2389,9 @@ gen12_test_oa_tlb_invalidate(void)
 	int num_reports1, num_reports2, num_expected_reports;
 	int64_t duration;
 
+	if (intel_gen(devid) < 12)
+		return;
+
 	/* Capture reports for 5 seconds twice and then make sure you get around
 	 * the same number of reports. In the case of failure, the number of
 	 * reports will vary largely since the beginning of the OA buffer
@@ -3003,6 +3006,9 @@ gen12_test_mi_rpc(void)
 	size_t format_size_32;
 	struct oa_format format = get_oa_format(test_set->perf_oa_format);
 
+	if (intel_gen(devid) < 12)
+		return;
+
 	/* Ensure perf_stream_paranoid is set to 1 by default */
 	write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1);
 
@@ -4115,6 +4121,9 @@ gen12_test_single_ctx_render_target_writes_a_counter(void)
 	int child_ret;
 	struct igt_helper_process child = {};
 
+	if (intel_gen(devid) < 12)
+		return;
+
 	/* Ensure perf_stream_paranoid is set to 1 by default */
 	write_u64_file("/proc/sys/dev/i915/perf_stream_paranoid", 1);
 
@@ -5062,8 +5071,6 @@ igt_main
 	}
 
 	igt_subtest_group {
-		igt_fixture igt_require(intel_gen(devid) >= 12);
-
 		igt_describe("Test MI REPORT PERF COUNT for Gen 12");
 		igt_subtest("gen12-mi-rpc")
 			gen12_test_mi_rpc();
-- 
2.31.0



More information about the igt-dev mailing list