igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm
@ 2018-08-14 15:31 Chris Wilson
  2018-08-14 15:31 ` [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-08-14 15:31 UTC (permalink / raw)
  To: igt-dev

Check that we restore runtime pm around debug suspends and hibernates.

v2: Differentiate between external test setup failure and one of
interest
v3: Keep basic-rte failing instead of skipping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/pm_rpm.c | 33 +++++++++++++++++++++++++--------
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 4268bb19a..756c31a5f 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -692,8 +692,11 @@ static void setup_pc8(void)
 	has_pc8 = true;
 }
 
-static void setup_environment(void)
+static bool setup_environment(void)
 {
+	if (has_runtime_pm)
+		goto out;
+
 	drm_fd = drm_open_driver_master(DRIVER_INTEL);
 	debugfs = igt_debugfs_dir(drm_fd);
 	igt_require(debugfs != -1);
@@ -707,8 +710,11 @@ static void setup_environment(void)
 
 	igt_info("Runtime PM support: %d\n", has_runtime_pm);
 	igt_info("PC8 residency support: %d\n", has_pc8);
-
 	igt_require(has_runtime_pm);
+
+out:
+	disable_all_screens(&ms_data);
+	return wait_for_suspended();
 }
 
 static void restore_environment(void)
@@ -1372,10 +1378,11 @@ static void __attribute__((noreturn)) stay_subtest(void)
 		sleep(600);
 }
 
-static void system_suspend_subtest(void)
+static void system_suspend_subtest(int state, int debug)
 {
 	disable_all_screens_and_wait(&ms_data);
-	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+
+	igt_system_suspend_autoresume(state, debug);
 	igt_assert(wait_for_suspended());
 }
 
@@ -1898,19 +1905,22 @@ int main(int argc, char *argv[])
 	igt_subtest_init_parse_opts(&argc, argv, "", long_options,
 				    help_str, opt_handler, NULL);
 
+	igt_subtest("basic-rte") {
+		igt_assert(setup_environment());
+		basic_subtest();
+	}
+
 	/* Skip instead of failing in case the machine is not prepared to reach
 	 * PC8+. We don't want bug reports from cases where the machine is just
 	 * not properly configured. */
 	igt_fixture
-		setup_environment();
+		igt_require(setup_environment());
 
 	if (stay)
 		igt_subtest("stay")
 			stay_subtest();
 
 	/* Essential things */
-	igt_subtest("basic-rte")
-		basic_subtest();
 	igt_subtest("drm-resources-equal")
 		drm_resources_equal_subtest();
 	igt_subtest("basic-pci-d3-state")
@@ -1992,12 +2002,19 @@ int main(int argc, char *argv[])
 				WAIT_STATUS | WAIT_EXTRA);
 
 	/* System suspend */
+	igt_subtest("system-suspend-devices")
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
 	igt_subtest("system-suspend")
-		system_suspend_subtest();
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
 	igt_subtest("system-suspend-execbuf")
 		system_suspend_execbuf_subtest();
 	igt_subtest("system-suspend-modeset")
 		system_suspend_modeset_subtest();
+	igt_subtest("system-hibernate-devices")
+		system_suspend_subtest(SUSPEND_STATE_DISK,
+				       SUSPEND_TEST_DEVICES);
+	igt_subtest("system-hibernate")
+		system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
 
 	/* GEM stress */
 	igt_subtest("gem-execbuf-stress")
-- 
2.18.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm
@ 2018-08-10  7:01 Chris Wilson
  2018-08-10 12:38 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2018-08-10  7:01 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev, imre.deak

Check that we restore runtime pm around debug suspends and hibernates.

v2: Differentiate between external test setup failure and one of
interest

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rpm.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 4268bb19a..1fbdda4ed 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -707,8 +707,10 @@ static void setup_environment(void)
 
 	igt_info("Runtime PM support: %d\n", has_runtime_pm);
 	igt_info("PC8 residency support: %d\n", has_pc8);
-
 	igt_require(has_runtime_pm);
+
+	disable_all_screens(&ms_data);
+	igt_require(wait_for_suspended());
 }
 
 static void restore_environment(void)
@@ -1372,10 +1374,11 @@ static void __attribute__((noreturn)) stay_subtest(void)
 		sleep(600);
 }
 
-static void system_suspend_subtest(void)
+static void system_suspend_subtest(int state, int debug)
 {
 	disable_all_screens_and_wait(&ms_data);
-	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+
+	igt_system_suspend_autoresume(state, debug);
 	igt_assert(wait_for_suspended());
 }
 
@@ -1992,12 +1995,19 @@ int main(int argc, char *argv[])
 				WAIT_STATUS | WAIT_EXTRA);
 
 	/* System suspend */
+	igt_subtest("system-suspend-devices")
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES);
 	igt_subtest("system-suspend")
-		system_suspend_subtest();
+		system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
 	igt_subtest("system-suspend-execbuf")
 		system_suspend_execbuf_subtest();
 	igt_subtest("system-suspend-modeset")
 		system_suspend_modeset_subtest();
+	igt_subtest("system-hibernate-devices")
+		system_suspend_subtest(SUSPEND_STATE_DISK,
+				       SUSPEND_TEST_DEVICES);
+	igt_subtest("system-hibernate")
+		system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE);
 
 	/* GEM stress */
 	igt_subtest("gem-execbuf-stress")
-- 
2.18.0

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

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

end of thread, other threads:[~2018-08-14 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 15:31 [igt-dev] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Chris Wilson
2018-08-14 15:31 ` [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
2018-08-14 16:42 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Patchwork
2018-08-14 23:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-08-10  7:01 [Intel-gfx] [PATCH i-g-t 1/2] " Chris Wilson
2018-08-10 12:38 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).