All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability
@ 2017-10-17  8:49 Chris Wilson
  2017-10-17  9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2017-10-17  8:49 UTC (permalink / raw)
  To: intel-gfx

CI doesn't run in whole-test mode, but runs each subtest individually.
Tests that are designed to do a block of work to be shared between many
subtests end up running that work multiple times (once per subtest) and
worse, that work is wasted if the subtest will be skipped.

pm_rc6_residency is one such example that measured all the residencies
up front before skipping, each skip was therefore taking in excess of
10s.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rc6_residency.c | 68 ++++++++++++++++++++++++++----------------------
 1 file changed, 37 insertions(+), 31 deletions(-)

diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 7c87302d..d6fc4701 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -53,11 +53,11 @@ struct residencies {
 
 static unsigned long get_rc6_enabled_mask(void)
 {
-	unsigned long rc6_mask;
+	unsigned long enabled;
 
-	rc6_mask = 0;
-	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &rc6_mask);
-	return rc6_mask;
+	enabled = 0;
+	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &enabled);
+	return enabled;
 }
 
 static unsigned long read_rc6_residency(const char *name)
@@ -85,20 +85,20 @@ static void residency_accuracy(unsigned int diff,
 		     "Sysfs RC6 residency counter is inaccurate.\n");
 }
 
-static void read_residencies(int devid, unsigned int rc6_mask,
+static void read_residencies(int devid, unsigned int mask,
 			     struct residencies *res)
 {
-	if (rc6_mask & RC6_ENABLED)
+	if (mask & RC6_ENABLED)
 		res->rc6 = read_rc6_residency("rc6");
 
-	if ((rc6_mask & RC6_ENABLED) &&
+	if ((mask & RC6_ENABLED) &&
 	    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)))
 		res->media_rc6 = read_rc6_residency("media_rc6");
 
-	if (rc6_mask & RC6P_ENABLED)
+	if (mask & RC6P_ENABLED)
 		res->rc6p = read_rc6_residency("rc6p");
 
-	if (rc6_mask & RC6PP_ENABLED)
+	if (mask & RC6PP_ENABLED)
 		res->rc6pp = read_rc6_residency("rc6pp");
 }
 
@@ -111,7 +111,7 @@ static unsigned long gettime_ms(void)
 	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
 }
 
-static void measure_residencies(int devid, unsigned int rc6_mask,
+static void measure_residencies(int devid, unsigned int mask,
 				struct residencies *res)
 {
 	struct residencies start = { };
@@ -119,15 +119,9 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
 	int retry;
 	unsigned long t;
 
-	if (!rc6_mask)
+	if (!mask)
 		return;
 
-	/*
-	 * For some reason my ivb isn't idle even after syncing up with the gpu.
-	 * Let's add a sleep just to make it happy.
-	 */
-	sleep(8);
-
 	/*
 	 * Retry in case of counter wrap-around. We simply re-run the
 	 * measurement, since the valid counter range is different on
@@ -135,9 +129,9 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
 	 */
 	for (retry = 0; retry < 2; retry++) {
 		t = gettime_ms();
-		read_residencies(devid, rc6_mask, &start);
+		read_residencies(devid, mask, &start);
 		sleep(SLEEP_DURATION);
-		read_residencies(devid, rc6_mask, &end);
+		read_residencies(devid, mask, &end);
 		t = gettime_ms() - t;
 
 		if (end.rc6 >= start.rc6 && end.media_rc6 >= start.media_rc6 &&
@@ -166,9 +160,8 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
 
 igt_main
 {
-	unsigned int rc6_mask;
-	int devid = 0;
-	struct residencies res;
+	unsigned int rc6_enabled = 0;
+	unsigned int devid = 0;
 
 	igt_skip_on_simulation();
 
@@ -181,31 +174,44 @@ igt_main
 		sysfs = igt_sysfs_open(fd, NULL);
 		close(fd);
 
-		rc6_mask = get_rc6_enabled_mask();
-		igt_require(rc6_mask);
-
-		measure_residencies(devid, rc6_mask, &res);
+		rc6_enabled = get_rc6_enabled_mask();
+		igt_require(rc6_enabled);
 	}
 
 	igt_subtest("rc6-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6_ENABLED));
+		struct residencies res;
+
+		igt_require(rc6_enabled & RC6_ENABLED);
 
+		measure_residencies(devid, RC6_ENABLED, &res);
 		residency_accuracy(res.rc6, res.duration, "rc6");
 	}
+
 	igt_subtest("media-rc6-accuracy") {
-		igt_skip_on(!((rc6_mask & RC6_ENABLED) &&
-			      (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid))));
+		struct residencies res;
 
+		igt_require((rc6_enabled & RC6_ENABLED) &&
+			    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)));
+
+		measure_residencies(devid, RC6_ENABLED, &res);
 		residency_accuracy(res.media_rc6, res.duration, "media_rc6");
 	}
+
 	igt_subtest("rc6p-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6P_ENABLED));
+		struct residencies res;
+
+		igt_require(rc6_enabled & RC6P_ENABLED);
 
+		measure_residencies(devid, RC6P_ENABLED, &res);
 		residency_accuracy(res.rc6p, res.duration, "rc6p");
 	}
+
 	igt_subtest("rc6pp-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6PP_ENABLED));
+		struct residencies res;
+
+		igt_require(rc6_enabled & RC6PP_ENABLED);
 
+		measure_residencies(devid, RC6PP_ENABLED, &res);
 		residency_accuracy(res.rc6pp, res.duration, "rc6pp");
 	}
 }
-- 
2.15.0.rc0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for igt/pm_rc6_residency: Measure residency after checking for applicability
  2017-10-17  8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
@ 2017-10-17  9:43 ` Patchwork
  2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
  2017-10-18  9:51 ` [PATCH igt] " Arkadiusz Hiler
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-10-17  9:43 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: igt/pm_rc6_residency: Measure residency after checking for applicability
URL   : https://patchwork.freedesktop.org/series/32097/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
d4d976de7e022cb56a2dbfe96c4ab10549e24acc igt/gem_mocs_settings: Skip non-existent engines

with latest DRM-Tip kernel build CI_DRM_3252
e4dedb9e7c81 drm-tip: 2017y-10m-17d-07h-45m-57s UTC integration manifest

No testlist changes.

Test kms_busy:
        Subgroup basic-flip-b:
                pass       -> FAIL       (fi-gdg-551) fdo#102654
Test kms_cursor_legacy:
        Subgroup basic-busy-flip-before-cursor-legacy:
                pass       -> FAIL       (fi-gdg-551) fdo#102618
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                dmesg-warn -> PASS       (fi-byt-j1900) fdo#101705 +1

fdo#102654 https://bugs.freedesktop.org/show_bug.cgi?id=102654
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:449s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:450s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:376s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:543s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:264s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:501s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:504s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:492s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:478s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:558s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:417s
fi-gdg-551       total:289  pass:176  dwarn:1   dfail:0   fail:3   skip:109 time:262s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:581s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:422s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:439s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:482s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:464s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:490s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:572s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:480s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:585s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:552s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:453s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:658s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:526s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:500s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:465s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:569s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:425s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_366/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.IGT: success for igt/pm_rc6_residency: Measure residency after checking for applicability
  2017-10-17  8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
  2017-10-17  9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-17 21:34 ` Patchwork
  2017-10-17 22:16   ` Chris Wilson
  2017-10-18  9:51 ` [PATCH igt] " Arkadiusz Hiler
  2 siblings, 1 reply; 6+ messages in thread
From: Patchwork @ 2017-10-17 21:34 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: igt/pm_rc6_residency: Measure residency after checking for applicability
URL   : https://patchwork.freedesktop.org/series/32097/
State : success

== Summary ==

Test perf:
        Subgroup polling:
                fail       -> PASS       (shard-hsw) fdo#102252
Test gem_sync:
        Subgroup basic-many-each:
                fail       -> PASS       (shard-hsw) fdo#100007

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

shard-hsw        total:2553 pass:1440 dwarn:0   dfail:0   fail:10  skip:1103 time:9242s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_366/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ✓ Fi.CI.IGT: success for igt/pm_rc6_residency: Measure residency after checking for applicability
  2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-10-17 22:16   ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2017-10-17 22:16 UTC (permalink / raw)
  To: Patchwork; +Cc: intel-gfx

Quoting Patchwork (2017-10-17 22:34:05)
> == Series Details ==
> 
> Series: igt/pm_rc6_residency: Measure residency after checking for applicability
> URL   : https://patchwork.freedesktop.org/series/32097/
> State : success
> 
> == Summary ==
> 
> Test perf:
>         Subgroup polling:
>                 fail       -> PASS       (shard-hsw) fdo#102252
> Test gem_sync:
>         Subgroup basic-many-each:
>                 fail       -> PASS       (shard-hsw) fdo#100007

No fails for shaving over 30s off the runtime...
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability
  2017-10-17  8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
  2017-10-17  9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-10-18  9:51 ` Arkadiusz Hiler
  2 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2017-10-18  9:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Oct 17, 2017 at 09:49:54AM +0100, Chris Wilson wrote:
> CI doesn't run in whole-test mode, but runs each subtest individually.
> Tests that are designed to do a block of work to be shared between many
> subtests end up running that work multiple times (once per subtest) and
> worse, that work is wasted if the subtest will be skipped.
> 
> pm_rc6_residency is one such example that measured all the residencies
> up front before skipping, each skip was therefore taking in excess of
> 10s.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

also I've retriggered the other rc6 patch

-- 
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability
@ 2017-12-04 14:06 Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2017-12-04 14:06 UTC (permalink / raw)
  To: intel-gfx

CI doesn't run in whole-test mode, but runs each subtest individually.
Tests that are designed to do a block of work to be shared between many
subtests end up running that work multiple times (once per subtest) and
worse, that work is wasted if the subtest will be skipped.

pm_rc6_residency is one such example that measured all the residencies
up front before skipping, each skip was therefore taking in excess of
10s.

v2: Put a small delay back before starting measurements as rc6 doesn't
start until an evaluation interval after idling.
v3: Drop rc6p+ tests; we have no control over the hw whether it decides
to use rc6 or deeper (we can enable it, but not dictate it).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ewelina Musial <ewelina.musial@intel.com> #v1
---
 tests/pm_rc6_residency.c | 122 +++++++++++++++++++++++++++--------------------
 1 file changed, 69 insertions(+), 53 deletions(-)

diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index ad05cca4..3f686019 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -53,11 +53,11 @@ struct residencies {
 
 static unsigned long get_rc6_enabled_mask(void)
 {
-	unsigned long rc6_mask;
+	unsigned long enabled;
 
-	rc6_mask = 0;
-	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &rc6_mask);
-	return rc6_mask;
+	enabled = 0;
+	igt_sysfs_scanf(sysfs, "power/rc6_enable", "%lu", &enabled);
+	return enabled;
 }
 
 static unsigned long read_rc6_residency(const char *name)
@@ -85,63 +85,67 @@ static void residency_accuracy(unsigned int diff,
 		     "Sysfs RC6 residency counter is inaccurate.\n");
 }
 
-static void read_residencies(int devid, unsigned int rc6_mask,
+static unsigned long gettime_ms(void)
+{
+	struct timespec ts;
+
+	clock_gettime(CLOCK_MONOTONIC, &ts);
+
+	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
+}
+
+static void read_residencies(int devid, unsigned int mask,
 			     struct residencies *res)
 {
-	if (rc6_mask & RC6_ENABLED)
+	res->duration = gettime_ms();
+
+	if (mask & RC6_ENABLED)
 		res->rc6 = read_rc6_residency("rc6");
 
-	if ((rc6_mask & RC6_ENABLED) &&
+	if ((mask & RC6_ENABLED) &&
 	    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)))
 		res->media_rc6 = read_rc6_residency("media_rc6");
 
-	if (rc6_mask & RC6P_ENABLED)
+	if (mask & RC6P_ENABLED)
 		res->rc6p = read_rc6_residency("rc6p");
 
-	if (rc6_mask & RC6PP_ENABLED)
+	if (mask & RC6PP_ENABLED)
 		res->rc6pp = read_rc6_residency("rc6pp");
-}
-
-static unsigned long gettime_ms(void)
-{
-	struct timespec ts;
 
-	clock_gettime(CLOCK_MONOTONIC, &ts);
-
-	return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
+	res->duration += (gettime_ms() - res->duration) / 2;
 }
 
-static void measure_residencies(int devid, unsigned int rc6_mask,
+static void measure_residencies(int devid, unsigned int mask,
 				struct residencies *res)
 {
 	struct residencies start = { };
 	struct residencies end = { };
 	int retry;
-	unsigned long t;
 
-	if (!rc6_mask)
+	if (!mask)
 		return;
 
-	/*
-	 * For some reason my ivb isn't idle even after syncing up with the gpu.
-	 * Let's add a sleep just to make it happy.
-	 */
-	sleep(8);
-
 	/*
 	 * Retry in case of counter wrap-around. We simply re-run the
 	 * measurement, since the valid counter range is different on
 	 * different platforms and so fixing it up would be non-trivial.
 	 */
+	read_residencies(devid, mask, &end);
+	igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
+		 end.duration, end.rc6, end.media_rc6, end.rc6p, end.rc6pp);
 	for (retry = 0; retry < 2; retry++) {
-		t = gettime_ms();
-		read_residencies(devid, rc6_mask, &start);
+		start = end;
 		sleep(SLEEP_DURATION);
-		read_residencies(devid, rc6_mask, &end);
-		t = gettime_ms() - t;
+		read_residencies(devid, mask, &end);
+
+		igt_debug("time=%d: rc6=(%d, %d), rc6p=%d, rc6pp=%d\n",
+			 end.duration,
+			 end.rc6, end.media_rc6, end.rc6p, end.rc6pp);
 
-		if (end.rc6 >= start.rc6 && end.media_rc6 >= start.media_rc6 &&
-		    end.rc6p >= start.rc6p && end.rc6pp >= start.rc6pp)
+		if (end.rc6 >= start.rc6 &&
+		    end.media_rc6 >= start.media_rc6 &&
+		    end.rc6p >= start.rc6p &&
+		    end.rc6pp >= start.rc6pp)
 			break;
 	}
 	igt_assert_f(retry < 2, "residency values are not consistent\n");
@@ -150,7 +154,7 @@ 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;
-	res->duration = t;
+	res->duration = end.duration - start.duration;
 
 	/*
 	 * For the purposes of this test case we want a given residency value
@@ -164,11 +168,23 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
 	res->rc6 += res->rc6p;
 }
 
+static unsigned long rc6_enable_us(void)
+{
+	/*
+	 * To know how long we need to wait for the device to enter rc6 once
+	 * idle, we need to look at GEN6_RC_EVALUATION_INTERVAL. Currently,
+	 * this is set to 125000 (12500 * 1280ns or 0.16s) on all platforms.
+	 * We must complete at least one EI with activity below the
+	 * per-platform threshold for RC6 to kick. Therefore, we must wait
+	 * at least 2 EI cycles, before we can expect rc6 to start ticking.
+	 */
+	return 2 * 160 * 1000;
+}
+
 igt_main
 {
-	unsigned int rc6_mask;
-	int devid = 0;
-	struct residencies res;
+	unsigned int rc6_enabled = 0;
+	unsigned int devid = 0;
 
 	igt_skip_on_simulation();
 
@@ -179,33 +195,33 @@ igt_main
 		fd = drm_open_driver(DRIVER_INTEL);
 		devid = intel_get_drm_devid(fd);
 		sysfs = igt_sysfs_open(fd, NULL);
-		close(fd);
 
-		rc6_mask = get_rc6_enabled_mask();
-		igt_require(rc6_mask);
+		/* Make sure rc6 counters are running */
+		igt_drop_caches_set(fd, DROP_IDLE);
+		usleep(rc6_enable_us());
 
-		measure_residencies(devid, rc6_mask, &res);
+		close(fd);
+
+		rc6_enabled = get_rc6_enabled_mask();
+		igt_require(rc6_enabled);
 	}
 
 	igt_subtest("rc6-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6_ENABLED));
+		struct residencies res;
+
+		igt_require(rc6_enabled & RC6_ENABLED);
 
+		measure_residencies(devid, rc6_enabled, &res);
 		residency_accuracy(res.rc6, res.duration, "rc6");
 	}
-	igt_subtest("media-rc6-accuracy") {
-		igt_skip_on(!((rc6_mask & RC6_ENABLED) &&
-			      (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid))));
 
-		residency_accuracy(res.media_rc6, res.duration, "media_rc6");
-	}
-	igt_subtest("rc6p-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6P_ENABLED));
+	igt_subtest("media-rc6-accuracy") {
+		struct residencies res;
 
-		residency_accuracy(res.rc6p, res.duration, "rc6p");
-	}
-	igt_subtest("rc6pp-accuracy") {
-		igt_skip_on(!(rc6_mask & RC6PP_ENABLED));
+		igt_require((rc6_enabled & RC6_ENABLED) &&
+			    (IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid)));
 
-		residency_accuracy(res.rc6pp, res.duration, "rc6pp");
+		measure_residencies(devid, rc6_enabled, &res);
+		residency_accuracy(res.media_rc6, res.duration, "media_rc6");
 	}
 }
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-04 14:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17  8:49 [PATCH igt] igt/pm_rc6_residency: Measure residency after checking for applicability Chris Wilson
2017-10-17  9:43 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-17 21:34 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-17 22:16   ` Chris Wilson
2017-10-18  9:51 ` [PATCH igt] " Arkadiusz Hiler
2017-12-04 14:06 Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.