All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org,
	Jonathan Cavitt <jonathan.cavitt@intel.com>
Subject: Re: [PATCH] drm/xe/configfs: Fix engine class parsing
Date: Tue, 23 Sep 2025 13:33:39 +0200	[thread overview]
Message-ID: <aNKFkyQvpvy1c3_X@black.igk.intel.com> (raw)
In-Reply-To: <20250922221209.110737-2-lucas.demarchi@intel.com>

On Mon, Sep 22, 2025 at 03:12:10PM -0700, Lucas De Marchi wrote:
> If mask is NULL, only the engine class should be accepted, so the
> pattern string should be completely parsed. This should fix passing e.g.
> rcs0 to ctx_restore_post_bb when it's only expecting the engine class.

Should we add to the doc so we don't mix up expectations between different
attributes?

Or do we care about the rest of pattern of mask is NULL? Perhaps it'll
allow us to have common expectations between attributes.

Raag

> Reported-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> Closes: https://lore.kernel.org/r/20250922155544.67712-1-jonathan.cavitt@intel.com
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_configfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
> index 8a9b950e7a6d1..beade13efbae7 100644
> --- a/drivers/gpu/drm/xe/xe_configfs.c
> +++ b/drivers/gpu/drm/xe/xe_configfs.c
> @@ -324,8 +324,8 @@ static const struct engine_info *lookup_engine_info(const char *pattern, u64 *ma
>  			continue;
>  
>  		pattern += strlen(engine_info[i].cls);
> -		if (!mask && !*pattern)
> -			return &engine_info[i];
> +		if (!mask)
> +			return *pattern ? NULL : &engine_info[i];
>  
>  		if (!strcmp(pattern, "*")) {
>  			*mask = engine_info[i].mask;
> -- 
> 2.50.1
> 

  parent reply	other threads:[~2025-09-23 11:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 22:12 [PATCH] drm/xe/configfs: Fix engine class parsing Lucas De Marchi
2025-09-22 22:27 ` Lucas De Marchi
2025-09-22 23:22 ` ✓ CI.KUnit: success for " Patchwork
2025-09-22 23:54 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-23  3:47 ` [PATCH] " Cavitt, Jonathan
2025-09-23  5:51 ` ✓ Xe.CI.Full: success for " Patchwork
2025-09-23 11:33 ` Raag Jadav [this message]
2025-09-23 15:06   ` [PATCH] " Lucas De Marchi
2025-09-24  8:28     ` Raag Jadav

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=aNKFkyQvpvy1c3_X@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.