All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/configfs: Fix engine class parsing
@ 2025-09-22 22:12 Lucas De Marchi
  2025-09-22 22:27 ` Lucas De Marchi
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Lucas De Marchi @ 2025-09-22 22:12 UTC (permalink / raw)
  To: intel-xe; +Cc: Lucas De Marchi, Jonathan Cavitt

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.

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


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

end of thread, other threads:[~2025-09-24  8:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH] " Raag Jadav
2025-09-23 15:06   ` Lucas De Marchi
2025-09-24  8:28     ` Raag Jadav

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.