[igt-dev] [PATCH i-g-t] test/perf: respect gen11 restriction in disable subslices

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Mar 30 12:48:45 UTC 2020


In particular don't try to enable more than half the subslices.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1543
Fixes: 779d43cda49c ("tests/perf: add global sseu parameter tests")
---
 tests/perf.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/perf.c b/tests/perf.c
index 086fdac4..0f65f247 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -5040,7 +5040,19 @@ test_global_sseu_config(void)
 		igt_drop_root();
 
 		sseu_param = default_sseu;
-		sseu_param.subslice_mask = mask_minus_one(sseu_param.subslice_mask);
+
+		if (intel_gen(devid) == 11) {
+			/*
+			 * On Gen11 there are restrictions on what
+			 * subslices can be disabled, notably we're
+			 * not able to enable more than half the
+			 * subslice. So disable half subslices only.
+			 */
+			for (int i = 0; __builtin_popcount(default_sseu.subslice_mask) / 2; i++)
+				sseu_param.subslice_mask = mask_minus_one(sseu_param.subslice_mask);
+		} else {
+			sseu_param.subslice_mask = mask_minus_one(sseu_param.subslice_mask);
+		}
 
 		stream_fd = __perf_open(drm_fd, &param, false);
 		__perf_close(stream_fd);
-- 
2.26.0



More information about the igt-dev mailing list