diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-04-04 17:44:30 +0200 |
---|---|---|
committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-04-10 11:26:18 +0200 |
commit | 146e4384956926d95c7636020adb5c4949c690da (patch) | |
tree | ffbdcb160a0a0b6fe89aa228d3a409b406c7ebc7 /drivers/gpu/drm/xe/xe_sriov.c | |
parent | e806fac0bd35512ac4590d89dabe0eb15a1721c4 (diff) |
drm/xe: Add proper detection of the SR-IOV PF mode
SR-IOV PF mode detection is based on PCI capability as reported by
the PCI dev_is_pf() function and additionally on 'max_vfs' module
parameter which could be also used to disable PF capability even
if SR-IOV PF capability is reported by the hardware.
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-3-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_sriov.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_sriov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c index 3e103edf7174..94fa98d8206e 100644 --- a/drivers/gpu/drm/xe/xe_sriov.c +++ b/drivers/gpu/drm/xe/xe_sriov.c @@ -11,6 +11,7 @@ #include "xe_device.h" #include "xe_mmio.h" #include "xe_sriov.h" +#include "xe_sriov_pf.h" /** * xe_sriov_mode_to_string - Convert enum value to string. @@ -58,6 +59,8 @@ void xe_sriov_probe_early(struct xe_device *xe) if (has_sriov) { if (test_is_vf(xe)) mode = XE_SRIOV_MODE_VF; + else if (xe_sriov_pf_readiness(xe)) + mode = XE_SRIOV_MODE_PF; } xe_assert(xe, !xe->sriov.__mode); |