[PATCH v6 08/11] drm/xe/configfs: Keep default device config settings together

Michal Wajdeczko michal.wajdeczko at intel.com
Tue Aug 5 15:09:52 UTC 2025



On 8/5/2025 3:28 PM, Lucas De Marchi wrote:
> On Thu, Jul 31, 2025 at 09:33:36PM +0200, Michal Wajdeczko wrote:
>> For easier maintenance add a placeholder where we can keep all
>> default device configuration settings in one place.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
>> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>> Reviewed-by: John Harrison <John.C.Harrison at Intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_configfs.c | 17 +++++++++++++----
>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
>> index 7ad9fc65e21d..150e7f2becc8 100644
>> --- a/drivers/gpu/drm/xe/xe_configfs.c
>> +++ b/drivers/gpu/drm/xe/xe_configfs.c
>> @@ -97,6 +97,16 @@ struct xe_config_group_device {
>>     struct mutex lock;
>> };
>>
>> +static struct xe_config_device device_defaults = {
> 
> any reason why this would not be const?
> 

while today we are extending our configfs support only
with completely new attributes (like survivability mode
or allowed engines) I was assuming that shortly we will
also move to configfs some of our existing modparams,
which are device specific, rather than module specific,
like:
 - GuC/HuC firmwares
 - max VFs
 - ...

so to keep the idea of 'device_defaults' as the only
place where default values are stored, I assumed, maybe
wrong, that we will need this to be non-const (either as
new location of some modparams or cached values of the
modparam attributes)

in [1] I was trying to make first step with max_vfs,
but patch was dropped for a while until this series will
be completed and we will have some better understanding
how to proceed

Michal

[1] https://patchwork.freedesktop.org/patch/664176/?series=151660&rev=1



More information about the Intel-xe mailing list