tests/perf_pmu: Test RC6 during runtime suspend
PATCH 1/1 tests/perf_pmu: Test RC6 during runtime suspend
From: Tvrtko Ursulin <[email protected]>
Test to check that the RC6 counter works as expected during and after runtime suspend.
v2:
* Use correct sysfs root by using IGT helpers.
* Turn off display to allow runtime suspend. (Imre)
* Two subtest flavours.
--- tests/perf_pmu.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-)
tests/perf_pmu.c +38 -4
@@ -40,6 +40,7 @@#include "igt_core.h" #include "igt_perf.h" #include "igt_sysfs.h" +#include "igt_pm.h" #include "sw_sync.h" IGT_TEST_DESCRIPTION ("Test the i915 pmu perf interface" );
@@ -151,6 +152,8 @@ static unsigned int e2ring(int gem_fd, const struct intel_execution_engine2 *e)#define TEST_BUSY (1)#define FLAG_SYNC (2)#define TEST_TRAILING_IDLE (4) +#define TEST_RUNTIME_PM (8) +#define FLAG_LONG (16)static void end_spin (int fd,igt_spin_t *spin,unsigned int flags) {
@@ -1245,19 +1248,44 @@ static bool wait_for_rc6(int fd) }static void -test_rc6 (int gem_fd) +test_rc6 (int gem_fd,unsigned int flags) {int64_t duration_ns =2e9 ;uint64_t idle, busy, prev;unsigned int slept;int fd, fw; +gem_quiescent_gpu (gem_fd); + fd =open_pmu (I915_PMU_RC6_RESIDENCY ); -gem_quiescent_gpu (gem_fd); +if (flags &TEST_RUNTIME_PM ) { +drmModeRes *res; + + res =drmModeGetResources (gem_fd); +igt_assert (res); + +/* force all connectors off */ +kmstest_set_vt_graphics_mode (); +kmstest_unset_all_crtcs (gem_fd, res); + +igt_require (igt_setup_runtime_pm ()); +igt_require (igt_wait_for_pm_status (IGT_RUNTIME_PM_STATUS_SUSPENDED )); + +/* +* Sleep for a bit to see if once woken up estimated RC6 hasn't +* drifted to far in advance of real RC6. +*/ +if (flags &FLAG_LONG ) { +pmu_read_single (fd); +sleep (5 ); +pmu_read_single (fd); + } + } +igt_require (wait_for_rc6 (fd)); -/* Go idle and check full RC6. */ +/* While idle check full RC6. */ prev =pmu_read_single (fd); slept =measured_usleep (duration_ns /1000 ); idle =pmu_read_single (fd);
@@ -1522,7 +1550,13 @@ igt_main* Test RC6 residency reporting. */ igt_subtest("rc6") -test_rc6 (fd); +test_rc6 (fd,0 ); + + igt_subtest("rc6-runtime-pm") +test_rc6 (fd,TEST_RUNTIME_PM ); + + igt_subtest("rc6-runtime-pm-long") +test_rc6 (fd,TEST_RUNTIME_PM |FLAG_LONG );/** * Check render nodes are counted.
Signature · 6 lines
2.14.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Tvrtko Ursulin (2018-02-07 13:34:05)
Quoted 52 lines
From: Tvrtko Ursulin <[email protected]>
Test to check that the RC6 counter works as expected during and after runtime suspend.
v2:
* Use correct sysfs root by using IGT helpers.
* Turn off display to allow runtime suspend. (Imre)
* Two subtest flavours.Signed-off-by Tvrtko Ursulin <[email protected]>--- tests/perf_pmu.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-)tests/perf_pmu.c +6
-1@@ -40,6 +40,7 @@#include "igt_core.h" #include "igt_perf.h" #include "igt_sysfs.h" +#include "igt_pm.h" #include "sw_sync.h" IGT_TEST_DESCRIPTION ("Test the i915 pmu perf interface" );@@ -151,6 +152,8 @@ static unsigned int e2ring(int gem_fd, const struct intel_execution_engine2 *e)#define TEST_BUSY (1)#define FLAG_SYNC (2)#define TEST_TRAILING_IDLE (4) +#define TEST_RUNTIME_PM (8) +#define FLAG_LONG (16)static void end_spin (int fd,igt_spin_t *spin,unsigned int flags) {@@ -1245,19 +1248,44 @@ static bool wait_for_rc6(int fd) }static void -test_rc6 (int gem_fd) +test_rc6 (int gem_fd,unsigned int flags) {int64_t duration_ns =2e9 ;uint64_t idle, busy, prev;unsigned int slept;int fd, fw; +gem_quiescent_gpu (gem_fd); + fd =open_pmu (I915_PMU_RC6_RESIDENCY );
tests/perf_pmu.c static bool wait_for_rc6(int fd) · line 1270
Quoted 10 lines
tests/perf_pmu.c +9
-1-gem_quiescent_gpu (gem_fd); +if (flags &TEST_RUNTIME_PM ) { +drmModeRes *res; + + res =drmModeGetResources (gem_fd); +igt_assert (res); + +/* force all connectors off */ +kmstest_set_vt_graphics_mode (); +kmstest_unset_all_crtcs (gem_fd, res);
drmModeFreeResources(res) or something.
tests/perf_pmu.c static bool wait_for_rc6(int fd) · line 1273
Quoted 2 lines
tests/perf_pmu.c +2
-0+igt_require (igt_setup_runtime_pm ()); +igt_require (igt_wait_for_pm_status (IGT_RUNTIME_PM_STATUS_SUSPENDED ));
This looks to be self-testing, so if it does work,
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for tests/perf_pmu: Test RC6 during runtime suspend (rev2)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: tests/perf_pmu: Test RC6 during runtime suspend (rev2)
URL : https://patchwork.freedesktop.org/series/37683/
State : success
== Summary ==
IGT patchset tested on top of latest successful build 2baf7ece5b6d2faccedc56527ec91623f41a85e4 lib: Move __gem_context_create to common ioctl wrapper library.
with latest DRM-Tip kernel build CI_DRM_373594ca1ebb0652 drm-tip: 2018y-02m-07d-13h-38m-30s UTC integration manifest
Testlist changes:
+igt@perf_pmu@rc6-runtime-pm
+igt@perf_pmu@rc6-runtime-pm-long
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:420s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:426s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:375s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:495s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:287s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:480s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:488s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:472s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:465s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:569s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:578s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:413s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:286s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:513s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:393s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:415s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:416s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:456s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:504s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:599s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:429s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:507s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:528s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:488s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:476s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:418s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:429s fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:398s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:469s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_884/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for tests/perf_pmu: Test RC6 during runtime suspend (rev2)
In reply to Tvrtko Ursulin== Series Details ==
== Series Details ==
Series: tests/perf_pmu: Test RC6 during runtime suspend (rev2)
URL : https://patchwork.freedesktop.org/series/37683/
State : failure
== Summary ==
Test perf:
Subgroup enable-disable:
fail -> PASS (shard-apl) fdo#103715
Subgroup oa-exponents:
pass -> FAIL (shard-apl) fdo#102254
Subgroup buffer-fill:
fail -> PASS (shard-apl) fdo#103755
Subgroup polling:
pass -> FAIL (shard-hsw) fdo#102252
Test gem_eio:
Subgroup in-flight:
dmesg-warn -> PASS (shard-snb) fdo#104058
Subgroup in-flight-suspend:
pass -> FAIL (shard-hsw) fdo#104676
Test kms_flip:
Subgroup flip-vs-blocking-wf-vblank:
fail -> PASS (shard-apl) fdo#100368 +2
Subgroup modeset-vs-vblank-race-interruptible:
fail -> PASS (shard-hsw) fdo#103060
Subgroup 2x-flip-vs-expired-vblank:
fail -> PASS (shard-hsw) fdo#102887
Test kms_cursor_crc:
Subgroup cursor-128x128-suspend:
skip -> PASS (shard-snb) fdo#103880
Test gem_softpin:
Subgroup noreloc-s3:
pass -> SKIP (shard-snb) fdo#103375
Test pm_rps:
Subgroup reset:
pass -> FAIL (shard-apl)fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#104058 https://bugs.freedesktop.org/show_bug.cgi?id=104058
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103880 https://bugs.freedesktop.org/show_bug.cgi?id=103880
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-apl total:3397 pass:1757 dwarn:1 dfail:0 fail:23 skip:1615 time:12539s shard-hsw total:3444 pass:1758 dwarn:1 dfail:0 fail:13 skip:1671 time:11499s shard-snb total:3444 pass:1350 dwarn:1 dfail:0 fail:10 skip:2083 time:6577s
Blacklisted hosts:
shard-kbl total:3428 pass:1898 dwarn:1 dfail:0 fail:22 skip:1506 time:9436s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_884/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev