From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org, imre.deak@linux.intel.com
Subject: [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload
Date: Fri, 10 Aug 2018 08:01:16 +0100 [thread overview]
Message-ID: <20180810070116.29667-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20180810070116.29667-1-chris@chris-wilson.co.uk>
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
next prev parent reply other threads:[~2018-08-10 7:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-08-14 14:11 ` [igt-dev] [PATCH i-g-t 2/2] igt/pm_rpm: Test reaquisition of runtime-pm after module reload 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180810070116.29667-2-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=imre.deak@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).