]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/wa: Steer RMW of MCR registers while building default LRC
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 6 Feb 2026 22:30:59 +0000 (14:30 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Thu, 19 Feb 2026 15:09:56 +0000 (07:09 -0800)
commit6c2e331c915ba9e774aa847921262805feb00863
tree73ca1d07dc6f0f0ae6b297110437d8939834f92b
parent9ff885ef8b428febbf41f13a511755d74704949e
drm/xe/wa: Steer RMW of MCR registers while building default LRC

When generating the default LRC, if a register is not masked, we apply
any save-restore programming necessary via a read-modify-write sequence
that will ensure we only update the relevant bits/fields without
clobbering the rest of the register.  However some of the registers that
need to be updated might be MCR registers which require steering to a
non-terminated instance to ensure we can read back a valid, non-zero
value. The steering of reads originating from a command streamer is
controlled by register CS_MMIO_GROUP_INSTANCE_SELECT.  Emit additional
MI_LRI commands to update the steering before any RMW of an MCR register
to ensure the reads are performed properly.

Note that needing to perform a RMW of an MCR register while building the
default LRC is pretty rare.  Most of the MCR registers that are part of
an engine's LRCs are also masked registers, so no MCR is necessary.

Fixes: f2f90989ccff ("drm/xe: Avoid reading RMW registers in emit_wa_job")
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
Link: https://patch.msgid.link/20260206223058.387014-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/regs/xe_engine_regs.h
drivers/gpu/drm/xe/xe_gt.c