aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_sriov.c
diff options
context:
space:
mode:
authorMichal Wajdeczko <michal.wajdeczko@intel.com>2024-04-10 19:03:34 +0200
committerMichal Wajdeczko <michal.wajdeczko@intel.com>2024-04-12 16:23:26 +0200
commit0bdd5b16ba0444f41d538f5927cb9b995d684594 (patch)
tree74d86aea98256cb83d0d5f4f07ed86eb00caeb62 /drivers/gpu/drm/xe/xe_sriov.c
parent79790b6818e96c58fe2bffee1b418c16e64e7b80 (diff)
drm/xe/pf: Introduce mutex to protect VFs configurations
PF driver will maintain configurations and resources for every VF and this data could span multiple tiles and/or GTs. Prepare mutex to protect data that we will add in upcoming patches. Reviewed-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240410170338.1199-2-michal.wajdeczko@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_sriov.c')
-rw-r--r--drivers/gpu/drm/xe/xe_sriov.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
index d324f131e3da..1b40f5de9ef5 100644
--- a/drivers/gpu/drm/xe/xe_sriov.c
+++ b/drivers/gpu/drm/xe/xe_sriov.c
@@ -94,6 +94,13 @@ int xe_sriov_init(struct xe_device *xe)
if (!IS_SRIOV(xe))
return 0;
+ if (IS_SRIOV_PF(xe)) {
+ int err = xe_sriov_pf_init_early(xe);
+
+ if (err)
+ return err;
+ }
+
xe_assert(xe, !xe->sriov.wq);
xe->sriov.wq = alloc_workqueue("xe-sriov-wq", 0, 0);
if (!xe->sriov.wq)