Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V7 2/4] tests/intel/pm_rpm: Split module-reload test
Date: Wed, 11 Oct 2023 15:47:20 +0530	[thread overview]
Message-ID: <20231011101722.3188258-3-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20231011101722.3188258-1-bhanuprakash.modem@intel.com>

Split module-reload test as with & w/o display.

- i915_pm_rpm@module-reload: Without display
- kms_pm_rpm@module-reload:  With display

Cc: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/intel/i915_pm_rpm.c | 11 -----------
 tests/intel/kms_pm_rpm.c  | 22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/tests/intel/i915_pm_rpm.c b/tests/intel/i915_pm_rpm.c
index 2b0a63bde..c0365b304 100644
--- a/tests/intel/i915_pm_rpm.c
+++ b/tests/intel/i915_pm_rpm.c
@@ -1468,17 +1468,6 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		igt_assert(igt_wait(device_in_pci_d3(pci_dev), 2000, 100));
 		teardown_environment(false);
 
-		igt_debug("Reload as normal\n");
-		igt_i915_driver_unload();
-
-		igt_kmsg(KMSG_INFO "Reloading i915 as normal\n");
-		igt_assert_eq(igt_i915_driver_load("mmio_debug=-1"), 0);
-
-		igt_assert(setup_environment(true));
-		pci_dev = igt_device_get_pci_device(drm_fd);
-		igt_assert(igt_wait(device_in_pci_d3(pci_dev), 2000, 100));
-		teardown_environment(true);
-
 		/* Remove our mmio_debugging module */
 		igt_i915_driver_unload();
 	}
diff --git a/tests/intel/kms_pm_rpm.c b/tests/intel/kms_pm_rpm.c
index 2882e265f..3e578cbf7 100644
--- a/tests/intel/kms_pm_rpm.c
+++ b/tests/intel/kms_pm_rpm.c
@@ -114,6 +114,9 @@
  * SUBTEST: modeset-stress-extra-wait
  * Description: Stress test with modeset (extra wait) using runtime PM
  *
+ * SUBTEST: module-reload
+ * Description: Test to check D3 state after module reload
+ *
  * SUBTEST: pc8-residency
  * Description: Basic sanity test for PC8+ states
  *
@@ -1697,4 +1700,23 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		teardown_environment();
 		forcewake_put(&ms_data);
 	}
+
+	igt_subtest("module-reload") {
+		struct pci_device *pci_dev;
+
+		igt_i915_driver_unload();
+
+		igt_kmsg(KMSG_INFO "Reloading i915 as normal\n");
+		igt_assert_eq(igt_i915_driver_load("mmio_debug=-1"), 0);
+
+		igt_assert(setup_environment());
+		pci_dev = igt_device_get_pci_device(drm_fd);
+		igt_assert(igt_wait(device_in_pci_d3(pci_dev), 2000, 100));
+		if (enable_one_screen_with_type(&ms_data, SCREEN_TYPE_ANY))
+			drm_resources_equal_subtest();
+		teardown_environment();
+
+		/* Remove our mmio_debugging module */
+		igt_i915_driver_unload();
+	}
 }
-- 
2.40.0

  parent reply	other threads:[~2023-10-11 10:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 10:17 [igt-dev] [i-g-t V7 0/4] tests/intel/pm: Separate display specific tests from i915_pm_rpm Bhanuprakash Modem
2023-10-11 10:17 ` [igt-dev] [i-g-t V7 1/4] " Bhanuprakash Modem
2023-10-11 10:17 ` Bhanuprakash Modem [this message]
2023-10-11 10:17 ` [igt-dev] [i-g-t V7 3/4] tests/intel/pm_rpm: Fix CI with renamed tests Bhanuprakash Modem
2023-10-11 14:55   ` Kamil Konieczny
2023-10-11 10:17 ` [igt-dev] [i-g-t V7 4/4] tests/intel-ci: Add module-reload test to CI Bhanuprakash Modem
2023-10-11 14:13   ` Sharma, Swati2
2023-10-11 20:16 ` [igt-dev] ✓ CI.xeBAT: success for tests/intel/pm: Separate display specific tests from i915_pm_rpm (rev4) Patchwork
2023-10-11 20:16 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-10-12 12:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=20231011101722.3188258-3-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@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