All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t] tests/i915/i915_pm_dc: Moved prev DC counter reading logic
@ 2021-12-01 10:37 Mastan Katragadda
  2021-12-01 12:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2021-12-01 15:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Mastan Katragadda @ 2021-12-01 10:37 UTC (permalink / raw)
  To: igt-dev, tejaskumarx.surendrakumar.upadhyay; +Cc: mastanx.katragadda

Reading of prev_dc counter in dc9-dpms subtest as 0, after reset
comparison with 0 test gets failed. taken prev_dc counter after
enterd into shallow DC state.fixes dc9-dpms subtest failures.

changes since V1:
        - Removed new lines and warnings from checkpatch.pl
        - Updated Subject

Signed-off-by: Mastan Katragadda <mastanx.katragadda@intel.com>
Reviewed-by: Jigar Bhatt <jigar.bhatt@intel.com>
---
 tests/i915/i915_pm_dc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 4ebeb3eb..2c2c5086 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -434,22 +434,22 @@ static void setup_dc9_dpms(data_t *data, int dc_target)
 	dpms_off(data);
 	igt_skip_on_f(!(igt_wait(read_dc_counter(data->debugfs_fd, dc_target) >
 				prev_dc, 3000, 100)), "Unable to enters shallow DC states\n");
+	prev_dc = read_dc_counter(data->debugfs_fd, dc_target);
 	dpms_on(data);
 	cleanup_dc_dpms(data);
+	dpms_off(data);
+	sleep(1); /* wait for counters reset*/
+	check_dc9(data, dc_target, prev_dc);
+	dpms_on(data);
 }
 
 static void test_dc9_dpms(data_t *data)
 {
-	int prev_dc, dc_target;
+	int dc_target;
 
 	require_dc_counter(data->debugfs_fd, CHECK_DC5);
 	dc_target = support_dc6(data->debugfs_fd) ? CHECK_DC6 : CHECK_DC5;
-	prev_dc = read_dc_counter(data->debugfs_fd, dc_target);
 	setup_dc9_dpms(data, dc_target);
-	dpms_off(data);
-	sleep(1); /* wait for counters reset*/
-	check_dc9(data, dc_target, prev_dc);
-	dpms_on(data);
 }
 
 static void kms_poll_state_restore(int sig)
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-01 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 10:37 [igt-dev] [i-g-t] tests/i915/i915_pm_dc: Moved prev DC counter reading logic Mastan Katragadda
2021-12-01 12:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-01 15:06 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.