From: Matt Atwood <matthew.s.atwood@intel.com>
To: igt-dev@lists.freedesktop.org, lucas.demarchi@intel.com,
mchehab@kernel.org
Subject: [igt-dev] [PATCH i-g-t v2] tests/xe/xe_huc_copy: check debugfs for huc running
Date: Thu, 13 Apr 2023 13:22:33 -0700 [thread overview]
Message-ID: <20230413202233.43822-1-matthew.s.atwood@intel.com> (raw)
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 period.
v2: support multitile (Lucas)
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
tests/xe/xe_huc_copy.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/tests/xe/xe_huc_copy.c b/tests/xe/xe_huc_copy.c
index cd68dbb5ac..65eb747687 100644
--- a/tests/xe/xe_huc_copy.c
+++ b/tests/xe/xe_huc_copy.c
@@ -152,6 +152,27 @@ 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 +183,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
next reply other threads:[~2023-04-13 20:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 20:22 Matt Atwood [this message]
2023-04-13 21:29 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/xe/xe_huc_copy: check debugfs for huc running (rev2) Patchwork
2023-04-14 3:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-18 20:57 ` [igt-dev] [PATCH i-g-t v2] tests/xe/xe_huc_copy: check debugfs for huc running Lucas De Marchi
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=20230413202233.43822-1-matthew.s.atwood@intel.com \
--to=matthew.s.atwood@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=mchehab@kernel.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