[Intel-gfx] [PATCH 7/7] tests/pm_rc6_residency: fix check if RC6P or RC6PP is enabled

Imre Deak imre.deak at intel.com
Mon May 18 08:35:39 PDT 2015


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 at intel.com>
---
 tests/pm_rc6_residency.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 54a6b10..9203d2f 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
-- 
2.1.4



More information about the Intel-gfx mailing list