drm/xe: Add proper detection of the SR-IOV PF mode
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 4 Apr 2024 15:44:30 +0000 (17:44 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 10 Apr 2024 09:26:18 +0000 (11:26 +0200)
commit146e4384956926d95c7636020adb5c4949c690da
treeffbdcb160a0a0b6fe89aa228d3a409b406c7ebc7
parente806fac0bd35512ac4590d89dabe0eb15a1721c4
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
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_sriov.c
drivers/gpu/drm/xe/xe_sriov_pf.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_sriov_pf.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_sriov_types.h