drm/xe/pf: Enable SR-IOV PF mode by default
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 22 Jul 2025 18:26:16 +0000 (20:26 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 4 Aug 2025 15:56:18 +0000 (11:56 -0400)
We already claim official support for SR-IOV PF/VF modes on PTL
and BMG platforms, but by default we start the Xe driver on those
platforms in non-virtualized mode (native) since we still have
max_vfs modparam set to disable creation of the VFs.

It's time to let the Xe driver support SR-IOV PF mode by default.
We were already testing this on our CI, which was relying on the
patch that was enabling it for CONFIG_DRM_XE_DEBUG used by our CI.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Thomas Hellstrom <thomas.hellstrom@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250722182618.30811-3-michal.wajdeczko@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
(cherry picked from commit a2b461bd6f3b36bded0a74178dec0e58e4714d3d)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_module.c

index 107ffe87808c54229b308047f03d0d65651517bb..d9391bd081941fe4bcd1a215538e20fe680edee0 100644 (file)
@@ -27,6 +27,8 @@
 #define DEFAULT_PROBE_DISPLAY          true
 #define DEFAULT_VRAM_BAR_SIZE          0
 #define DEFAULT_FORCE_PROBE            CONFIG_DRM_XE_FORCE_PROBE
+#define DEFAULT_MAX_VFS                        ~0
+#define DEFAULT_MAX_VFS_STR            "unlimited"
 #define DEFAULT_WEDGED_MODE            1
 #define DEFAULT_SVM_NOTIFIER_SIZE      512
 
@@ -34,6 +36,9 @@ struct xe_modparam xe_modparam = {
        .probe_display =        DEFAULT_PROBE_DISPLAY,
        .guc_log_level =        DEFAULT_GUC_LOG_LEVEL,
        .force_probe =          DEFAULT_FORCE_PROBE,
+#ifdef CONFIG_PCI_IOV
+       .max_vfs =              DEFAULT_MAX_VFS,
+#endif
        .wedged_mode =          DEFAULT_WEDGED_MODE,
        .svm_notifier_size =    DEFAULT_SVM_NOTIFIER_SIZE,
        /* the rest are 0 by default */
@@ -79,7 +84,8 @@ MODULE_PARM_DESC(force_probe,
 module_param_named(max_vfs, xe_modparam.max_vfs, uint, 0400);
 MODULE_PARM_DESC(max_vfs,
                 "Limit number of Virtual Functions (VFs) that could be managed. "
-                "(0 = no VFs [default]; N = allow up to N VFs)");
+                "(0=no VFs; N=allow up to N VFs "
+                "[default=" DEFAULT_MAX_VFS_STR "])");
 #endif
 
 module_param_named_unsafe(wedged_mode, xe_modparam.wedged_mode, int, 0600);