[igt-dev] [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case
Bhatt, Jigar
jigar.bhatt at intel.com
Wed Dec 1 03:56:08 UTC 2021
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