drm/xe: Move GFX_MODE programming to RTP
authorMatt Roper <matthew.d.roper@intel.com>
Fri, 24 Apr 2026 20:48:17 +0000 (13:48 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 27 Apr 2026 20:20:34 +0000 (13:20 -0700)
commit4c936a0a22d200a6828fd051d035f09abab2835e
tree5c3d8d4ce38b8cd9c606f379220b0537a43597c3
parentee9b3c6c79ac643c02320b881a4c1fbaf1eb4da8
drm/xe: Move GFX_MODE programming to RTP

The write GFX_MODE to disable engine "legacy mode" and to enable MSI-X
support 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.  This also helps consolidate common logic that was duplicated
between the main driver initialization path and the dead-code execlist
initialization path.

This also allows us to drop GFX_MODE from the list of extra registers to
be added to the GuC ADS' save-restore list since all registers on the
RTP table are added automatically.

v2:
 - Actually use the xe_rtp_match_has_msix match function added.
   (Shuicheng)

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