* [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 7:01 ` [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
2018-08-14 13:52 ` [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Imre Deak
0 siblings, 2 replies; 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* [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload
2018-08-10 7:01 [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Chris Wilson
@ 2018-08-10 7:01 ` Chris Wilson
2018-08-14 14:11 ` [igt-dev] " Imre Deak
2018-08-14 13:52 ` [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Imre Deak
1 sibling, 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
It doesn't work right now and desperately needs to be fixed...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/intel-ci/fast-feedback.testlist | 1 +
tests/pm_rpm.c | 28 ++++++++++++++++++++++++---
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 1f3b95357..c625904d5 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -272,3 +272,4 @@ igt@vgem_basic@unload
igt@drv_module_reload@basic-reload
igt@drv_module_reload@basic-no-display
igt@drv_module_reload@basic-reload-inject
+igt@pm_rpm@module-reload
diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 1fbdda4ed..79cdf969a 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -692,7 +692,7 @@ static void setup_pc8(void)
has_pc8 = true;
}
-static void setup_environment(void)
+static bool setup_environment(void)
{
drm_fd = drm_open_driver_master(DRIVER_INTEL);
debugfs = igt_debugfs_dir(drm_fd);
@@ -710,7 +710,7 @@ static void setup_environment(void)
igt_require(has_runtime_pm);
disable_all_screens(&ms_data);
- igt_require(wait_for_suspended());
+ return wait_for_suspended();
}
static void restore_environment(void)
@@ -1905,7 +1905,7 @@ int main(int argc, char *argv[])
* 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")
@@ -2026,5 +2026,27 @@ int main(int argc, char *argv[])
igt_fixture
teardown_environment();
+ igt_subtest("module-reload") {
+ igt_debug("Reload w/o display\n");
+ igt_i915_driver_unload();
+ igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
+
+ igt_assert(setup_environment());
+ basic_subtest();
+ drm_resources_equal_subtest();
+ pci_d3_state_subtest();
+ teardown_environment();
+
+ igt_debug("Reload as normal\n");
+ igt_i915_driver_unload();
+ igt_assert_eq(igt_i915_driver_load(NULL), 0);
+
+ igt_assert(setup_environment());
+ basic_subtest();
+ drm_resources_equal_subtest();
+ pci_d3_state_subtest();
+ teardown_environment();
+ }
+
igt_exit();
}
--
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* Re: [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload
2018-08-10 7:01 ` [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
@ 2018-08-14 14:11 ` Imre Deak
0 siblings, 0 replies; 5+ messages in thread
From: Imre Deak @ 2018-08-14 14:11 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev, imre.deak, intel-gfx
On Fri, Aug 10, 2018 at 08:01:16AM +0100, Chris Wilson wrote:
> It doesn't work right now and desperately needs to be fixed...
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
On both patches:
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> tests/intel-ci/fast-feedback.testlist | 1 +
> tests/pm_rpm.c | 28 ++++++++++++++++++++++++---
> 2 files changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
> index 1f3b95357..c625904d5 100644
> --- a/tests/intel-ci/fast-feedback.testlist
> +++ b/tests/intel-ci/fast-feedback.testlist
> @@ -272,3 +272,4 @@ igt@vgem_basic@unload
> igt@drv_module_reload@basic-reload
> igt@drv_module_reload@basic-no-display
> igt@drv_module_reload@basic-reload-inject
> +igt@pm_rpm@module-reload
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 1fbdda4ed..79cdf969a 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -692,7 +692,7 @@ static void setup_pc8(void)
> has_pc8 = true;
> }
>
> -static void setup_environment(void)
> +static bool setup_environment(void)
> {
> drm_fd = drm_open_driver_master(DRIVER_INTEL);
> debugfs = igt_debugfs_dir(drm_fd);
> @@ -710,7 +710,7 @@ static void setup_environment(void)
> igt_require(has_runtime_pm);
>
> disable_all_screens(&ms_data);
> - igt_require(wait_for_suspended());
> + return wait_for_suspended();
> }
>
> static void restore_environment(void)
> @@ -1905,7 +1905,7 @@ int main(int argc, char *argv[])
> * 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")
> @@ -2026,5 +2026,27 @@ int main(int argc, char *argv[])
> igt_fixture
> teardown_environment();
>
> + igt_subtest("module-reload") {
> + igt_debug("Reload w/o display\n");
> + igt_i915_driver_unload();
> + igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
> +
> + igt_assert(setup_environment());
> + basic_subtest();
> + drm_resources_equal_subtest();
> + pci_d3_state_subtest();
> + teardown_environment();
> +
> + igt_debug("Reload as normal\n");
> + igt_i915_driver_unload();
> + igt_assert_eq(igt_i915_driver_load(NULL), 0);
> +
> + igt_assert(setup_environment());
> + basic_subtest();
> + drm_resources_equal_subtest();
> + pci_d3_state_subtest();
> + teardown_environment();
> + }
> +
> igt_exit();
> }
> --
> 2.18.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm
2018-08-10 7:01 [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Chris Wilson
2018-08-10 7:01 ` [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
@ 2018-08-14 13:52 ` Imre Deak
2018-08-14 14:03 ` Chris Wilson
1 sibling, 1 reply; 5+ messages in thread
From: Imre Deak @ 2018-08-14 13:52 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev, imre.deak, intel-gfx
On Fri, Aug 10, 2018 at 08:01:15AM +0100, Chris Wilson wrote:
> 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());
For some subtests (e.g. basic-rte) this check is the only (real)
purpose. So shouldn't this be added to specific subtests instead (e.g.
the system suspend ones) to avoid converting fail to skip?
Otherwise looks ok.
> }
>
> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm
2018-08-14 13:52 ` [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Imre Deak
@ 2018-08-14 14:03 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2018-08-14 14:03 UTC (permalink / raw)
To: Imre Deak; +Cc: igt-dev, imre.deak, intel-gfx
Quoting Imre Deak (2018-08-14 14:52:16)
> On Fri, Aug 10, 2018 at 08:01:15AM +0100, Chris Wilson wrote:
> > 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());
>
> For some subtests (e.g. basic-rte) this check is the only (real)
> purpose. So shouldn't this be added to specific subtests instead (e.g.
> the system suspend ones) to avoid converting fail to skip?
The flip flop from PASS/SKIP is still significant, so I don't worry too
much. With a little tweak, it shall be done.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-14 14:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 7:01 [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Chris Wilson
2018-08-10 7:01 ` [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload Chris Wilson
2018-08-14 14:11 ` [igt-dev] " Imre Deak
2018-08-14 13:52 ` [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm Imre Deak
2018-08-14 14:03 ` Chris Wilson
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).