diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-06-27 12:43:05 +0200 |
---|---|---|
committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-07-01 18:01:31 +0200 |
commit | d2d5409786fda857e44478e5fa27c9441a128219 (patch) | |
tree | 454c9ef84d50c95dc87f5b8751f24cb7103108f4 /drivers/gpu/drm/xe | |
parent | drm/xe/guc: Configure TLB timeout based on CT buffer size (diff) | |
download | linux-d2d5409786fda857e44478e5fa27c9441a128219.tar.xz linux-d2d5409786fda857e44478e5fa27c9441a128219.zip |
drm/xe/pf: Remove inlined #ifdef CONFIG_PCI_IOV
We can remove #ifdef CONFIG_PCI_IOV in .c files if we provide
dummy replacement of the xe_pci_sriov_configure() function.
Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240627104305.1477-1-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci_sriov.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index f5d5a368e595..732ee0d02124 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -748,10 +748,8 @@ static void xe_pci_remove(struct pci_dev *pdev) if (!xe) /* driver load aborted, nothing to cleanup */ return; -#ifdef CONFIG_PCI_IOV if (IS_SRIOV_PF(xe)) xe_pci_sriov_configure(pdev, 0); -#endif xe_device_remove(xe); xe_pm_runtime_fini(xe); @@ -1009,9 +1007,7 @@ static struct pci_driver xe_pci_driver = { .probe = xe_pci_probe, .remove = xe_pci_remove, .shutdown = xe_pci_shutdown, -#ifdef CONFIG_PCI_IOV .sriov_configure = xe_pci_sriov_configure, -#endif #ifdef CONFIG_PM_SLEEP .driver.pm = &xe_pm_ops, #endif diff --git a/drivers/gpu/drm/xe/xe_pci_sriov.h b/drivers/gpu/drm/xe/xe_pci_sriov.h index 3b8bfbf7e1d9..c76dd0d90495 100644 --- a/drivers/gpu/drm/xe/xe_pci_sriov.h +++ b/drivers/gpu/drm/xe/xe_pci_sriov.h @@ -8,6 +8,13 @@ struct pci_dev; +#ifdef CONFIG_PCI_IOV int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs); +#else +static inline int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) +{ + return 0; +} +#endif #endif |