drm/xe/configfs: Add attribute to disable engines
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 28 May 2025 21:54:07 +0000 (14:54 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 2 Jun 2025 18:00:46 +0000 (11:00 -0700)
commitd09bc3edfe5c702463e2640314b7db2219242446
tree76447a7fc38a2c6b25b9583951d7d4d7345ceb09
parent58b51df807d7394a09ddb95b47099d59465e3777
drm/xe/configfs: Add attribute to disable engines

Add the userspace interface to load the driver with fewer engines.
The syntax is to just echo the engine names to a file in configfs, like
below:

echo 'rcs0,bcs0' > /sys/kernel/config/xe/<bdf>/engine_allowed

With that engines other than rcs0 and bcs0 will not be enabled. To
enable all instances from a class, a '*' can be used.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20250528-engine-mask-v4-4-f4636d2a890a@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_configfs.c