[PATCH i-g-t] i915/gem_ctx_freq: Disable SLPC efficient freq for the test
Ashutosh Dixit
ashutosh.dixit at intel.com
Sat Jun 3 00:28:57 UTC 2023
When SLPC efficient freq is enabled, GPU frequencies can be outside the
min/max range set from sysfs. Any test which compares actual GPU frequency
against set frequencies is therefore meaninful only when SLPC efficient
freq is disabled.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6786
Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
tests/i915/gem_ctx_freq.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/tests/i915/gem_ctx_freq.c b/tests/i915/gem_ctx_freq.c
index 2c30934daa23..354321937705 100644
--- a/tests/i915/gem_ctx_freq.c
+++ b/tests/i915/gem_ctx_freq.c
@@ -207,6 +207,21 @@ static void disable_boost(void)
igt_sysfs_set(sysfs, "gt_max_freq_mhz", buf);
}
+static void slpc_ignore_efficient_freq(int i915, const char *val)
+{
+ int dir;
+
+ if (!(gem_using_guc_submission(i915) && i915_is_slpc_enabled(i915)))
+ return;
+
+ igt_require((dir = igt_sysfs_gt_open(i915, 0)) >= 0);
+ igt_require(igt_sysfs_has_attr(dir, "slpc_ignore_eff_freq"));
+
+ igt_assert(igt_sysfs_set(dir, "slpc_ignore_eff_freq", val));
+
+ close(dir);
+}
+
igt_main
{
int i915 = -1;
@@ -220,8 +235,14 @@ igt_main
igt_install_exit_handler(restore_sysfs_freq);
disable_boost();
+ slpc_ignore_efficient_freq(i915, "1");
}
igt_subtest_f("sysfs")
sysfs_range(i915);
+
+ igt_fixture {
+ slpc_ignore_efficient_freq(i915, "0");
+ close(i915);
+ }
}
--
2.38.0
More information about the Intel-gfx-trybot
mailing list