Skip to contentSkip to conversation

tests/i915/i915_pm_dc: Fix condition in dc9-test

PATCH Superseded Jigar Bhatt 2 participants 2 messages Oct 8, 2021

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/i915_pm_dc: Fix condition in dc9-test

Inside dc9_wait_entry, we do not have DC9 counter, so we rely on dc5/dc6 counter reset
to check if display engine was in DC9. Test is passed if live counter is less than the previous counter. Correcting condition igt_wait(read_dc_counter(debugfs_fd, dc_target) <

			prev_dc, seconds, 100);
---
 tests/i915/i915_pm_dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/i915/i915_pm_dc.c +1 -1
index 4c9b871c..9db66ba2 100644
@@ -404,7 +404,7 @@ static bool dc9_wait_entry(uint32_t debugfs_fd, int dc_target, int prev_dc, int
 	 * since we do not have DC9 counter,
 	 * so we rely on dc5/dc6 counter reset to check if display engine was in DC9.
 	 */
-	return igt_wait(read_dc_counter(debugfs_fd, dc_target) >
+	return igt_wait(read_dc_counter(debugfs_fd, dc_target) <
 			prev_dc, seconds, 100);
 }
 
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jigar Bhatt

Inside dc9_wait_entry, we do not have DC9 counter, so we rely on dc5/dc6 counter reset
to check if display engine was in DC9. Test is passed if live counter is less than the previous counter. Correcting condition igt_wait(read_dc_counter(debugfs_fd, dc_target) <

			prev_dc, seconds, 100);

Yep, looks like this check was accidentally reversed in 2f4e6430a97f04284d1cafb1479e7c1b0b2d596a.

Are there bug reports that this commits should close with a Fixes:
line?

Quoted 20 lines
---
 tests/i915/i915_pm_dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/i915/i915_pm_dc.c +1 -1
index 4c9b871c..9db66ba2 100644
@@ -404,7 +404,7 @@ static bool dc9_wait_entry(uint32_t debugfs_fd, int dc_target, int prev_dc, int
 	 * since we do not have DC9 counter,
 	 * so we rely on dc5/dc6 counter reset to check if display engine was in DC9.
 	 */
-	return igt_wait(read_dc_counter(debugfs_fd, dc_target) >
+	return igt_wait(read_dc_counter(debugfs_fd, dc_target) <
 			prev_dc, seconds, 100);
 }
 
Signature · 1 line
2.25.1