]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe: Enable SR-IOV for PTL
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 6 Feb 2025 21:45:45 +0000 (22:45 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 7 Feb 2025 17:32:12 +0000 (18:32 +0100)
We should now have sufficient changes in the driver to run it on
PTL platforms in the SR-IOV Physical Function (PF) mode, that would
allow us to enable SR-IOV Virtual Functions (VFs), and successfully
probe our driver in the VF mode on enabled VF devices.

To unblock SR-IOV PF mode you need to load xe with modparam:

 xe.max_vfs=7

Then to enable VFs it is sufficient to use:

 $ echo 7 > /sys/bus/pci/devices/0000:00:02.0/sriov_numvfs

Note that in default auto-provisioning all VFs are allocated with
some amount of shared resources (like unlimited GPU execution and
preemption times, fair GGTT space, fair GuC context IDs range, ...)

However with CONFIG_DEBUG_FS enabled it is possible to tweak most
of the SR-IOV configuration parameters using attributes like:

 /sys/kernel/debug/dri/0000:00:02.0/gt0/
 ├── pf
 │   ├── contexts_spare
 │   ├── doorbells_spare
 │   ├── exec_quantum_ms
 │   ├── ggtt_spare
 │   ├── preempt_timeout_us
 │   ├── sched_priority
 │   └── ...
 ├── vf1
 │   ├── contexts_quota
 │   ├── doorbells_quota
 │   ├── exec_quantum_ms
 │   ├── ggtt_quota
 │   ├── preempt_timeout_us
 │   ├── sched_priority
 │   └── ...
 ├── vf2
 │   └── ...
 :

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Tested-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250206214545.940-1-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_pci.c

index cfa1ad7a1f2d3da5a8db9f7763ad68f094400df1..663bfc29cddc1638d8e006c6b74e9353b079272e 100644 (file)
@@ -363,6 +363,7 @@ static const struct xe_device_desc ptl_desc = {
        PLATFORM(PANTHERLAKE),
        .dma_mask_size = 46,
        .has_display = true,
+       .has_sriov = true,
        .require_force_probe = true,
 };