Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 1/3] tests/intel/xe_pm: Rename and clarify mocs_suspend_resume
@ 2024-05-13 16:24 Lucas De Marchi
  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
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Lucas De Marchi @ 2024-05-13 16:24 UTC (permalink / raw)
  To: igt-dev; +Cc: Janga Rahul Kumar, Badal Nilawar, Lucas De Marchi

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


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

end of thread, other threads:[~2024-05-14 13:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-13 16:24 [PATCH i-g-t 1/3] tests/intel/xe_pm: Rename and clarify mocs_suspend_resume Lucas De Marchi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox