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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check the actual frequency, and not just the current requested, before
delaying the system stable.

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

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);
 }
 
-- 
2.24.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux