[igt-dev] [PATCH i-g-t 09/20] tests/psr: Check for PSR entry more often and only for a second.

Dhinakaran Pandiyan dhinakaran.pandiyan at intel.com
Wed Apr 11 02:37:21 UTC 2018


1 second interval is too long, check every 100ms.

PSR gets enabled when pipes are enabled on BDW+. It shouldn't take
5 seconds even on VLV/CHV, where we delay a bit. Limit the checks to a
1 second total wait, so that we know if the delay is longer.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
---
 tests/kms_psr_sink_crc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index e04e0f6a..d940ec89 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -214,11 +214,13 @@ static bool psr_enabled(data_t *data)
 
 static bool wait_psr_entry(data_t *data)
 {
-	int timeout = 5;
+	int timeout = 10;
+
 	while (timeout--) {
 		if (psr_enabled(data))
 			return true;
-		sleep(1);
+		usleep(100000);
+		igt_debug("Waiting for PSR entry %d ms\n", (10-timeout)*100);
 	}
 	return false;
 }
-- 
2.14.1



More information about the igt-dev mailing list