[igt-dev] [PATCH i-g-t v2] tests/xe/xe_huc_copy: check debugfs for huc running

Lucas De Marchi lucas.demarchi at intel.com
Tue Apr 18 20:57:08 UTC 2023


On Thu, Apr 13, 2023 at 01:22:33PM -0700, Matt Atwood wrote:
>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.

s/period// ? not sure what's the meaning of "period" here.

>v2: support multitile (Lucas)
>
>Signed-off-by: Matt Atwood <matthew.s.atwood at 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)
>+	{

coding style..

otherwise,

	Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>+		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
>


More information about the igt-dev mailing list