All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/xe/configfs: Fix engine class parsing
@ 2025-09-24 15:27 Lucas De Marchi
  2025-09-24 15:27 ` [PATCH v2 2/2] drm/xe/configfs: Improve doc for ctx_restore* attributes Lucas De Marchi
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Lucas De Marchi @ 2025-09-24 15:27 UTC (permalink / raw)
  To: intel-xe; +Cc: Raag Jadav, Jonathan Cavitt, Lucas De Marchi

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
Fixes: e2a9854d806e ("drm/xe/configfs: Allow to select by class only")
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@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 21:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 15:27 [PATCH v2 1/2] drm/xe/configfs: Fix engine class parsing Lucas De Marchi
2025-09-24 15:27 ` [PATCH v2 2/2] drm/xe/configfs: Improve doc for ctx_restore* attributes Lucas De Marchi
2025-09-24 15:42   ` Raag Jadav
2025-09-24 16:00 ` [PATCH v2 1/2] drm/xe/configfs: Fix engine class parsing Raag Jadav
2025-09-24 16:12 ` ✗ CI.checkpatch: warning for series starting with [v2,1/2] " Patchwork
2025-09-24 16:14 ` ✓ CI.KUnit: success " Patchwork
2025-09-24 16:57 ` ✓ Xe.CI.BAT: " Patchwork
2025-09-24 21:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-09-24 21:24 ` [PATCH v2 1/2] " Lucas De Marchi

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.