]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe: Move HWSTAM programming to RTP
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 24 Apr 2026 20:48:14 +0000 (13:48 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 27 Apr 2026 20:20:34 +0000 (13:20 -0700)
commita04d8267bf20c73de3368d8ff9fd8289c532f9c5
tree93975463c67f2fc44a0e38fb2eef3648b7301b51
parentcdf9781025b3ed18f15f6c061c070b8bdcc1716f
drm/xe: Move HWSTAM programming to RTP

The write to RING_HWSTAM to disable hardware status page writes on
interrupt was unnecessarily open-coded in xe_hw_engine_enable_ring();
it's preferable to do such programming in the engine_entries[] RTP table
since gets reflected/verified in debugfs, and will also automatically
ensure that the register is properly saved/restored around engine
resets.

In this case the HWSTAM register wasn't explicitly added to the GuC ADS'
save-restore list, so there was the potential for the value to be lost
on engine resets.  This doesn't seem to have happened in practice, so
likely the GuC firmware is automatically saving/restoring this register
on our behalf, but we shouldn't rely on this implicit behavior going
forward.

One other slight change with this patch is that HWSTAM will now be
programmed on the vestigial execlist (non-GuC) initialization path.
Since the register's default value is 0x0 and the documentation
indicates that it's only legal to leave a single bit unmasked at a time,
this likely would have been an illegal situation if the execlist code
were actually usable.

Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Link: https://patch.msgid.link/20260424-engine-setup-v2-4-59cc620a25f1@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_hw_engine.c