The kernel doesn't like it when you set max_freq < min_freq and complains bitterly. So before setting max_freq = min_freq, first set min_freq to min_freq! Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> --- tests/perf_pmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index bcb90c84..b8422211 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -946,6 +946,8 @@ test_frequency(int gem_fd) min_freq = igt_sysfs_get_u32(sysfs, "gt_RPn_freq_mhz"); max_freq = igt_sysfs_get_u32(sysfs, "gt_RP0_freq_mhz"); boost_freq = igt_sysfs_get_u32(sysfs, "gt_boost_freq_mhz"); + igt_info("Frequency: min=%u, max=%u, boost=%u MHz\n", + min_freq, max_freq, boost_freq); igt_require(min_freq > 0 && max_freq > 0 && boost_freq > 0); igt_require(max_freq > min_freq); igt_require(boost_freq > min_freq); @@ -956,6 +958,8 @@ test_frequency(int gem_fd) /* * Set GPU to min frequency and read PMU counters. */ + igt_require(igt_sysfs_set_u32(sysfs, "gt_min_freq_mhz", min_freq)); + igt_require(igt_sysfs_get_u32(sysfs, "gt_min_freq_mhz") == min_freq); igt_require(igt_sysfs_set_u32(sysfs, "gt_max_freq_mhz", min_freq)); igt_require(igt_sysfs_get_u32(sysfs, "gt_max_freq_mhz") == min_freq); igt_require(igt_sysfs_set_u32(sysfs, "gt_boost_freq_mhz", min_freq)); -- 2.15.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx