Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3] tests/xe/xe_huc_copy: check debugfs for huc running
@ 2023-04-19 16:07 Matt Atwood
  2023-04-19 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/xe/xe_huc_copy: check debugfs for huc running (rev3) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matt Atwood @ 2023-04-19 16:07 UTC (permalink / raw)
  To: igt-dev, mchehab, lucas.demarchi

Use debugfs to make sure that huc is loaded for xe_huc_copy. This
test will eventually need to determine if huc failed to load or if the
platform supports it.

v2: support multitile (Lucas)
v3: style/commit message (Lucas)

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
 tests/xe/xe_huc_copy.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/tests/xe/xe_huc_copy.c b/tests/xe/xe_huc_copy.c
index cd68dbb5ac..fdac907d67 100644
--- a/tests/xe/xe_huc_copy.c
+++ b/tests/xe/xe_huc_copy.c
@@ -152,6 +152,26 @@ test_huc_copy(int fd)
 	xe_vm_destroy(fd, vm);
 }
 
+static bool
+is_huc_running(int fd)
+{
+	char buf[4096];
+	char *s;
+	int gt;
+
+	xe_for_each_gt(fd, gt) {
+		char name[256];
+
+		sprintf(name, "gt%d/uc/huc_info", gt);
+		igt_debugfs_read(fd, name, buf);
+		s = strstr(buf, "RUNNING");
+
+		if (s)
+			return true;
+	}
+	return false;
+}
+
 igt_main
 {
 	int xe;
@@ -162,7 +182,11 @@ igt_main
 	}
 
 	igt_subtest("huc_copy") {
-		igt_skip_on(!IS_TIGERLAKE(intel_get_drm_devid(xe)));
+		/*
+		 * TODO: eventually need to differentiate huc failed to load vs
+		 * platform doesnt have huc
+		 */
+		igt_skip_on(!is_huc_running(xe));
 		test_huc_copy(xe);
 	}
 
-- 
2.39.2



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

end of thread, other threads:[~2023-04-24 18:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19 16:07 [igt-dev] [PATCH i-g-t v3] tests/xe/xe_huc_copy: check debugfs for huc running Matt Atwood
2023-04-19 17:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/xe/xe_huc_copy: check debugfs for huc running (rev3) Patchwork
2023-04-19 21:11 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-04-24 18:03 ` [igt-dev] [PATCH i-g-t v3] tests/xe/xe_huc_copy: check debugfs for huc running Lucas De Marchi

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