Commit d21d44db authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Thomas Hellström

drm/xe/vf: Don't touch GuC irq registers if using memory irqs

On platforms where VFs are using memory based interrupts, we
missed invalid access to no longer existing interrupt registers,
as we keep them marked with XE_REG_OPTION_VF. To fix that just
either setup memirq vectors in GuC or enable legacy interrupts.

Fixes: aef4eb7c ("drm/xe/vf: Setup memory based interrupts in GuC")
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240617154736.685-1-michal.wajdeczko@intel.com
(cherry picked from commit f0ccd2d8)
Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
parent 6ba59ff4
...@@ -631,8 +631,6 @@ int xe_guc_enable_communication(struct xe_guc *guc) ...@@ -631,8 +631,6 @@ int xe_guc_enable_communication(struct xe_guc *guc)
struct xe_device *xe = guc_to_xe(guc); struct xe_device *xe = guc_to_xe(guc);
int err; int err;
guc_enable_irq(guc);
if (IS_SRIOV_VF(xe) && xe_device_has_memirq(xe)) { if (IS_SRIOV_VF(xe) && xe_device_has_memirq(xe)) {
struct xe_gt *gt = guc_to_gt(guc); struct xe_gt *gt = guc_to_gt(guc);
struct xe_tile *tile = gt_to_tile(gt); struct xe_tile *tile = gt_to_tile(gt);
...@@ -640,6 +638,8 @@ int xe_guc_enable_communication(struct xe_guc *guc) ...@@ -640,6 +638,8 @@ int xe_guc_enable_communication(struct xe_guc *guc)
err = xe_memirq_init_guc(&tile->sriov.vf.memirq, guc); err = xe_memirq_init_guc(&tile->sriov.vf.memirq, guc);
if (err) if (err)
return err; return err;
} else {
guc_enable_irq(guc);
} }
xe_mmio_rmw32(guc_to_gt(guc), PMINTRMSK, xe_mmio_rmw32(guc_to_gt(guc), PMINTRMSK,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment