diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2024-09-10 16:47:28 -0700 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2024-09-11 15:17:35 -0700 |
commit | 6fb5d1a1d376910700d054d13cefbf0812b444a9 (patch) | |
tree | 5f246154978664bf9536b2c3e0057296617c2a77 /drivers/gpu/drm/xe/xe_pci.c | |
parent | 1877c88fa9b9bdbce7a65d7cbd2aa4e29bb514af (diff) |
drm/xe: Adjust mmio code to pass VF substructure to SRIOV code
Although we want to break the GT-centric nature of the MMIO code in the
general driver, the SRIOV handling still relies on data in a VF
substructure of the GT. So add a GT backpointer, but name it
sriov_vf_gt to make it clear that it's only for this one specific
special case and will not be set or usable for anything else.
v2:
- Store backpointer to the GT itself rather than the SRIOV-specific
substructure. (Michal)
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> # v1
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-53-matthew.d.roper@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pci.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index d68f5685071d..d045ea68c808 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -714,6 +714,9 @@ static int xe_info_init(struct xe_device *xe, gt->mmio.regs = tile->mmio.regs; gt->mmio.regs_size = tile->mmio.regs_size; gt->mmio.tile = tile; + if (IS_SRIOV_VF(xe)) + gt->mmio.sriov_vf_gt = gt; + if (MEDIA_VER(xe) < 13 && media_desc) gt->info.engine_mask |= media_desc->hw_engine_mask; @@ -737,6 +740,8 @@ static int xe_info_init(struct xe_device *xe, gt->mmio.adj_offset = MEDIA_GT_GSI_OFFSET; gt->mmio.adj_limit = MEDIA_GT_GSI_LENGTH; gt->mmio.tile = tile; + if (IS_SRIOV_VF(xe)) + gt->mmio.sriov_vf_gt = gt; /* * FIXME: At the moment multi-tile and standalone media are |