Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: Apply Wa_14020316580 in xe_gt_idle_enable_pg()

Wa_14020316580 was getting clobbered by power gating init code
later in the driver load sequence. Move the Wa so that
it applies correctly.

Fixes: 7cd05ef89c9d ("drm/xe/xe2hpm: Add initial set of workarounds")
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20251129052548.70766-1-vinay.belgaumkar@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
(cherry picked from commit 8b5502145351bde87f522df082b9e41356898ba3)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

authored by

Vinay Belgaumkar and committed by
Thomas Hellström
c88a0731 b32045d7

+9 -8
+8
drivers/gpu/drm/xe/xe_gt_idle.c
··· 5 5 6 6 #include <drm/drm_managed.h> 7 7 8 + #include <generated/xe_wa_oob.h> 8 9 #include "xe_force_wake.h" 9 10 #include "xe_device.h" 10 11 #include "xe_gt.h" ··· 17 16 #include "xe_mmio.h" 18 17 #include "xe_pm.h" 19 18 #include "xe_sriov.h" 19 + #include "xe_wa.h" 20 20 21 21 /** 22 22 * DOC: Xe GT Idle ··· 146 144 xe_mmio_write32(mmio, MEDIA_POWERGATE_IDLE_HYSTERESIS, 25); 147 145 xe_mmio_write32(mmio, RENDER_POWERGATE_IDLE_HYSTERESIS, 25); 148 146 } 147 + 148 + if (XE_GT_WA(gt, 14020316580)) 149 + gtidle->powergate_enable &= ~(VDN_HCP_POWERGATE_ENABLE(0) | 150 + VDN_MFXVDENC_POWERGATE_ENABLE(0) | 151 + VDN_HCP_POWERGATE_ENABLE(2) | 152 + VDN_MFXVDENC_POWERGATE_ENABLE(2)); 149 153 150 154 xe_mmio_write32(mmio, POWERGATE_ENABLE, gtidle->powergate_enable); 151 155 xe_force_wake_put(gt_to_fw(gt), fw_ref);
-8
drivers/gpu/drm/xe/xe_wa.c
··· 270 270 XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)), 271 271 XE_RTP_ENTRY_FLAG(FOREACH_ENGINE), 272 272 }, 273 - { XE_RTP_NAME("14020316580"), 274 - XE_RTP_RULES(MEDIA_VERSION(1301)), 275 - XE_RTP_ACTIONS(CLR(POWERGATE_ENABLE, 276 - VDN_HCP_POWERGATE_ENABLE(0) | 277 - VDN_MFXVDENC_POWERGATE_ENABLE(0) | 278 - VDN_HCP_POWERGATE_ENABLE(2) | 279 - VDN_MFXVDENC_POWERGATE_ENABLE(2))), 280 - }, 281 273 { XE_RTP_NAME("14019449301"), 282 274 XE_RTP_RULES(MEDIA_VERSION(1301), ENGINE_CLASS(VIDEO_DECODE)), 283 275 XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)),
+1
drivers/gpu/drm/xe/xe_wa_oob.rules
··· 76 76 77 77 15015404425_disable PLATFORM(PANTHERLAKE), MEDIA_STEP(B0, FOREVER) 78 78 16026007364 MEDIA_VERSION(3000) 79 + 14020316580 MEDIA_VERSION(1301)