diff mbox series

[i-g-t] i915/pm_rps: Wait for the actual frequency to settle

Message ID 20191025214919.27684-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t] i915/pm_rps: Wait for the actual frequency to settle | expand

Commit Message

Chris Wilson Oct. 25, 2019, 9:49 p.m. UTC
Check the actual frequency, and not just the current requested, before
delaying the system stable.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti@intel.com>
---
 tests/i915/i915_pm_rps.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Andi Shyti Oct. 26, 2019, 5:40 p.m. UTC | #1
Hi Chris,

On Fri, Oct 25, 2019 at 10:49:19PM +0100, Chris Wilson wrote:
> Check the actual frequency, and not just the current requested, before
> delaying the system stable.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Andi Shyti <andi.shyti@intel.com>

Reviewed-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi
diff mbox series

Patch

diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index 478c7be76..c67759d06 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -46,6 +46,7 @@  static int drm_fd;
 
 enum {
 	CUR,
+	ACT,
 	MIN,
 	MAX,
 	RP0,
@@ -63,6 +64,7 @@  struct sysfs_file {
 	FILE *filp;
 } sysfs_files[] = {
 	{ "cur", "r", NULL },
+	{ "act", "r", NULL },
 	{ "min", "rb+", NULL },
 	{ "max", "rb+", NULL },
 	{ "RP0", "r", NULL },
@@ -469,14 +471,14 @@  static void idle_check(void)
 		read_freqs(freqs);
 		dump(freqs);
 		check_freq_constraints(freqs);
-		if (freqs[CUR] == freqs[RPn])
+		if (freqs[ACT] == freqs[RPn])
 			break;
 		usleep(1000 * IDLE_WAIT_TIMESTEP_MSEC);
 		wait += IDLE_WAIT_TIMESTEP_MSEC;
 	} while (wait < IDLE_WAIT_TIMEOUT_MSEC);
 
 	igt_debugfs_dump(drm_fd, "i915_rps_boost_info");
-	igt_assert_eq(freqs[CUR], freqs[RPn]);
+	igt_assert_eq(freqs[ACT], freqs[RPn]);
 	igt_debug("Required %d msec to reach cur=idle\n", wait);
 }