Skip to content

Commit

Permalink
drm/xe: Add max_vfs module parameter
Browse files Browse the repository at this point in the history
We want to have an option to limit the number of the VFs that the
PF driver will be able to manage.  With this limit set to zero we
will also have a way to completely disable the PF functionality.

Since we currently don't support SR-IOV on any platform, we start
with this limit set to zero by default.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240404154431.583-2-michal.wajdeczko@intel.com
  • Loading branch information
Michal Wajdeczko committed Apr 10, 2024
1 parent a918e77 commit e806fac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/xe/xe_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ module_param_named_unsafe(force_probe, xe_modparam.force_probe, charp, 0400);
MODULE_PARM_DESC(force_probe,
"Force probe options for specified devices. See CONFIG_DRM_XE_FORCE_PROBE for details.");

#ifdef CONFIG_PCI_IOV
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)");
#endif

struct init_funcs {
int (*init)(void);
void (*exit)(void);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/xe/xe_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ struct xe_modparam {
char *huc_firmware_path;
char *gsc_firmware_path;
char *force_probe;
#ifdef CONFIG_PCI_IOV
unsigned int max_vfs;
#endif
};

extern struct xe_modparam xe_modparam;
Expand Down

0 comments on commit e806fac

Please sign in to comment.