[igt-dev] [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case

Katragadda, MastanX mastanx.katragadda at intel.com
Wed Dec 1 04:05:18 UTC 2021


Hi Jigar, 
                I have seen this failure on gen12 platforms as well as gen9 , if we ran dc6-dpms followed by dc9-dpms tests both are passes. Because when ever dc6-dpms is ran last counter greater than 0 due to that dc9-dpms gets pass. But in case CI shards  subtest dc9-dpms only running there we seen this failures. Same thing observed in gen12 platforms locally.

Thanks,
Mastan

-----Original Message-----
From: Bhatt, Jigar <jigar.bhatt at intel.com> 
Sent: 01 December 2021 09:26
To: Katragadda, MastanX <mastanx.katragadda at intel.com>; igt-dev at lists.freedesktop.org; Surendrakumar Upadhyay, TejaskumarX <tejaskumarx.surendrakumar.upadhyay at intel.com>
Subject: RE: [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case

Hi Mastan,

So after this change is it incrementing like 0 to other value(1 or 2 or else)  ? so older platforms have issue which is reading 0 only ?  

Thanks and regards,
Jigar Bhatt

-----Original Message-----
From: Katragadda, MastanX <mastanx.katragadda at intel.com> 
Sent: Wednesday, December 1, 2021 9:23 AM
To: Bhatt, Jigar <jigar.bhatt at intel.com>; igt-dev at lists.freedesktop.org; Surendrakumar Upadhyay, TejaskumarX <tejaskumarx.surendrakumar.upadhyay at intel.com>
Subject: RE: [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case

Hi Jigar, 
	  If we  ran dc9-dpms subtest only  prev_dc counter is 0 always, comparison 0 after reset tests get failed.

Thanks

-----Original Message-----
From: Bhatt, Jigar <jigar.bhatt at intel.com> 
Sent: 01 December 2021 09:16
To: Katragadda, MastanX <mastanx.katragadda at intel.com>; igt-dev at lists.freedesktop.org; Surendrakumar Upadhyay, TejaskumarX <tejaskumarx.surendrakumar.upadhyay at intel.com>
Subject: RE: [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case

Hi Mastan,

What's the reason to change ? If you are reading counter value in beginning of test and after checking DC states are allowed what's the different in counter value ?
 
Thanks and regards,
Jigar Bhatt

-----Original Message-----
From: Katragadda, MastanX <mastanx.katragadda at intel.com> 
Sent: Monday, November 29, 2021 1:02 PM
To: igt-dev at lists.freedesktop.org; Surendrakumar Upadhyay, TejaskumarX <tejaskumarx.surendrakumar.upadhyay at intel.com>
Cc: Katragadda, MastanX <mastanx.katragadda at intel.com>; Bhatt, Jigar <jigar.bhatt at intel.com>
Subject: [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case

Reading prev_dc counter is most of the times 0 after reset comparison with 0 test gets failed. taken prev_dc counter after enterd into shallow DC state.

Signed-off-by: Mastan Katragadda <mastanx.katragadda at intel.com>
---
 tests/i915/i915_pm_dc.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index 4ebeb3eb..074b765b 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -434,22 +434,24 @@ 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



More information about the igt-dev mailing list