]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/configfs: Allow adding configurations for future VFs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 31 Jul 2025 21:21:45 +0000 (23:21 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 5 Aug 2025 19:30:48 +0000 (12:30 -0700)
commitca0ed3b10f5dba790808107896c568cc037a74f4
tree1a586b72e38c534d44bc575354e558248a5d5354
parentb4687422c322e5afc0f5d9425b29080c06dc17b9
drm/xe/configfs: Allow adding configurations for future VFs

Since we are expecting that all configuration directory names
will match some of the existing devices, we can't provide any
configuration for the VFs until they are actually enabled.

But we can relax that restriction by just checking if there
is a PF device that could create given VF. This is easy since
all our PF devices are always present at function 0 and we can
query PF device for number of VFs it could support.

Then for some system with PF device at 0000:00:02.0 we can add
configs for all VFs:

  /sys/kernel/config/xe/
  ├── 0000:00:02.0
  │   └── ...
  ├── 0000:00:02.1
  │   └── ...
  ├── 0000:00:02.2
  │   └── ...
  :
  └── 0000:00:02.7
      └── ...

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250731212145.179898-1-michal.wajdeczko@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_configfs.c