Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Atwood <matthew.s.atwood@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_huc_copy: check debugfs for huc running
Date: Wed, 12 Apr 2023 15:02:31 -0700	[thread overview]
Message-ID: <ZDcqdykMyq76FuTb@msatwood-mobl> (raw)
In-Reply-To: <20230412215639.p4bhx7jn4wwqq73i@ldmartin-desk2.lan>

On Wed, Apr 12, 2023 at 02:56:39PM -0700, Lucas De Marchi wrote:
> On Wed, Apr 12, 2023 at 02:05:58PM -0700, Matt Atwood wrote:
> > Use debugfs to make sure that huc is loaded for xe_huc_copy. This
> > function will need to be updated for multitile functionality.
> > 
> > Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
> > ---
> > tests/xe/xe_huc_copy.c | 18 +++++++++++++++++-
> > 1 file changed, 17 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tests/xe/xe_huc_copy.c b/tests/xe/xe_huc_copy.c
> > index cd68dbb5ac..58d770106e 100644
> > --- a/tests/xe/xe_huc_copy.c
> > +++ b/tests/xe/xe_huc_copy.c
> > @@ -152,6 +152,22 @@ test_huc_copy(int fd)
> > 	xe_vm_destroy(fd, vm);
> > }
> > 
> > +static bool
> > +is_huc_running(int fd)
> > +{
> > +	char buf[4096];
> > +	char *s;
> > +
> > +	/*
> > +	 * TODO: add multi tile support
> 
> can't be a todo, otherwise it doesn't work on MTL since there
> the media gt is gt1. It's simple enough to add
> 
> 	int gt;
> 
> 	xe_for_each_gt(fd, gt) {
> 		char name[256];
> 
> 		sprintf(name, "gt%d/uc/huc_info", gt);
> 		...
> 		if (s)
> 			return true;
> 	}
> 
> 	return false;
Ack
> 	
> in xe it seems that when HuC is not loaded, for whatever reason
> we fail module load. So this is fine for now. Eventually we will need to
> differentiate "failed to load HuC" from "platform doesn't have huc"
> from "huc failed to run for whatever reason".  I think this can be a
> TODO.
will leave as todo.
> 
> Lucas De Marchi
> 
> > +	 */
> > +
> > +	igt_debugfs_read(fd, "gt0/uc/huc_info", buf);
> > +	s = strstr(buf, "RUNNING");
> > +
> > +	return s;
> > +}
> > +
> > igt_main
> > {
> > 	int xe;
> > @@ -162,7 +178,7 @@ igt_main
> > 	}
> > 
> > 	igt_subtest("huc_copy") {
> > -		igt_skip_on(!IS_TIGERLAKE(intel_get_drm_devid(xe)));
> > +		igt_skip_on(!is_huc_running(xe));
> > 		test_huc_copy(xe);
> > 	}
> > 
> > -- 
> > 2.39.2
> > 

      reply	other threads:[~2023-04-12 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 21:05 [igt-dev] [PATCH i-g-t] tests/xe/xe_huc_copy: check debugfs for huc running Matt Atwood
2023-04-12 21:44 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-04-12 21:56 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
2023-04-12 22:02   ` Matt Atwood [this message]

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=ZDcqdykMyq76FuTb@msatwood-mobl \
    --to=matthew.s.atwood@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lucas.demarchi@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