[igt-dev] [i-g-t] tests/i915/i915_pm_dc: Fix DC9 test case
Bhatt, Jigar
jigar.bhatt at intel.com
Wed Dec 1 04:13:00 UTC 2021
-----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);
}
IF all are passing looks good to me. Only prev_dc counters order changed.
Reviewed-by: Jigar Bhatt <jigar.bhatt at intel.com>
static void kms_poll_state_restore(int sig)
--
2.25.1
More information about the igt-dev
mailing list