summaryrefslogtreecommitdiff
path: root/tests/pm_rc6_residency.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2015-05-15 17:30:58 +0300
committerImre Deak <imre.deak@intel.com>2015-05-19 11:35:55 +0300
commit554aac5f3e349cb5e6cd99f42826893abf564d85 (patch)
treec1c7d73f4cdcff79b29423b3a7eeea62e19781a1 /tests/pm_rc6_residency.c
parent2b47e219be73bb03993fc0d0a78dd7db93c3321b (diff)
tests/pm_rc6_residency: fix check if RC6P or RC6PP is enabled
The test checks the residency in a given RC6 state or any deeper states that are also enabled. For example the RC6 subtest checks the combined residency in RC6/RC6P/RC6PP. Since the kernel reported value for the RC6 residency doesn't include the RC6P or RC6PP residency we need to adjust the RC6 value accordingly. A similar adjustment is needed for the RC6P subtest. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90369 Signed-off-by: Imre Deak <imre.deak@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/pm_rc6_residency.c')
-rw-r--r--tests/pm_rc6_residency.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 54a6b10b..9203d2fa 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -162,6 +162,17 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
res->rc6p = end.rc6p - start.rc6p;
res->rc6pp = end.rc6pp - start.rc6pp;
res->media_rc6 = end.media_rc6 - start.media_rc6;
+
+ /*
+ * For the purposes of this test case we want a given residency value
+ * to include the time spent in the corresponding RC state _and_ also
+ * the time spent in any enabled deeper states. So for example if any
+ * of RC6P or RC6PP is enabled we want the time spent in these states
+ * to be also included in the RC6 residency value. The kernel reported
+ * residency values are exclusive, so add up things here.
+ */
+ res->rc6p += res->rc6pp;
+ res->rc6 += res->rc6p;
}
igt_main