Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Janga Rahul Kumar <janga.rahul.kumar@intel.com>,
	Badal Nilawar <badal.nilawar@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH i-g-t 1/3] tests/intel/xe_pm: Rename and clarify mocs_suspend_resume
Date: Mon, 13 May 2024 09:24:32 -0700	[thread overview]
Message-ID: <20240513162435.952578-1-lucas.demarchi@intel.com> (raw)

mocs_suspend_resume is not really suspending/resuming the CPU. It's just
checking rpm (GPU) goes back to suspended status after dropping the
forcewake.

Also drop the additional argument and just use the same "s_state",
passing NO_SUSPEND in this case, like it's done in other tests in xe_pm.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 tests/intel/xe_pm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
index e81a75d88..1215b5c2a 100644
--- a/tests/intel/xe_pm.c
+++ b/tests/intel/xe_pm.c
@@ -617,14 +617,14 @@ static void test_mmap(device_t device, uint32_t placement, uint32_t flags)
 }
 
 /**
- * SUBTEST: mocs_suspend_resume
+ * SUBTEST: mocs-rpm
  * Description:
  *     Validate mocs register contents over suspend resume
  *
  * Functionality: mocs
  * Run type: FULL
  */
-static void test_mocs_suspend_resume(device_t device, bool runtime_sr, enum igt_suspend_state state)
+static void test_mocs_suspend_resume(device_t device, int s_state)
 {
 	int gt;
 
@@ -639,16 +639,16 @@ static void test_mocs_suspend_resume(device_t device, bool runtime_sr, enum igt_
 		igt_debugfs_dump(device.fd_xe, path);
 		igt_debugfs_read(device.fd_xe, path, mocs_content_pre);
 
-		if (runtime_sr) {
+		if (s_state == NO_SUSPEND) {
 			fw_handle = igt_debugfs_open(device.fd_xe, "forcewake_all", O_RDONLY);
 			igt_assert(fw_handle >= 0);
 			igt_assert(igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE);
 
-			/* Runtime suspend  */
+			/* Make sure runtime pm goes back to suspended status after closing forcewake_all */
 			close(fw_handle);
 			igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
 		} else {
-			igt_system_suspend_autoresume(state, SUSPEND_TEST_NONE);
+			igt_system_suspend_autoresume(s_state, SUSPEND_TEST_NONE);
 		}
 		igt_assert(igt_debugfs_exists(device.fd_xe, path, O_RDONLY));
 		igt_debugfs_dump(device.fd_xe, path);
@@ -758,7 +758,7 @@ igt_main
 		}
 
 		igt_subtest_f("%s-mocs", s->name)
-			test_mocs_suspend_resume(device, 0, s->state);
+			test_mocs_suspend_resume(device, s->state);
 	}
 
 	for (const struct d_state *d = d_states; d->name; d++) {
@@ -824,8 +824,8 @@ igt_main
 			igt_pm_set_autosuspend_delay(device.pci_xe, delay_ms);
 		}
 
-		igt_subtest("mocs_suspend_resume")
-			test_mocs_suspend_resume(device, 1, 0);
+		igt_subtest("mocs-rpm")
+			test_mocs_suspend_resume(device, NO_SUSPEND);
 	}
 
 	igt_fixture {
-- 
2.43.0


             reply	other threads:[~2024-05-13 16:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 16:24 Lucas De Marchi [this message]
2024-05-13 16:24 ` [PATCH i-g-t 2/3] tests/intel/xe_pm: Move mocs documentation to the right place Lucas De Marchi
2024-05-13 16:44   ` Cavitt, Jonathan
2024-05-13 17:22   ` Rodrigo Vivi
2024-05-13 16:24 ` [PATCH i-g-t 3/3] tests/intel/xe_pm: Fix S4 testing Lucas De Marchi
2024-05-13 16:48   ` Cavitt, Jonathan
2024-05-13 17:22   ` Rodrigo Vivi
2024-05-13 16:48 ` [PATCH i-g-t 1/3] tests/intel/xe_pm: Rename and clarify mocs_suspend_resume Cavitt, Jonathan
2024-05-13 17:21 ` Rodrigo Vivi
2024-05-13 22:30 ` ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2024-05-13 22:39 ` ✓ CI.xeBAT: " Patchwork
2024-05-14  0:49 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-14 13:04   ` Lucas De Marchi
2024-05-14 10:53 ` ✗ Fi.CI.IGT: " 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=20240513162435.952578-1-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=janga.rahul.kumar@intel.com \
    /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