drm/xe: Enable Wa_14025515070, Enable indirect ring state for XE2+
Subsystems (2)
v4 cover drm/xe: Enable Wa_14025515070, Enable indirect ring state for XE2+
Enable workaround 14025515070 to fix idle command streamer state on context register. This allows user of indirect ring state on XE2+ platforms. Previously this default was reverted, then added separately for XE3+ GTs. This patch Reverts and restores those previous patches after enabling the new workaround.
indirect_ring_state will now be enabled by default for XE2+ platforms. When this workaround is not present indirect_ring_state will show as disabled with a notification.
v2: Enable for GT 20.04. Use range for media versions.
v3: Shorten KVL name, notice. Correct versions for WA. (Daniele)
Reorder revert and applies for correct bisect. Added explanations. Add additional macros for XE_RTP_PASTE longer expansion.
v4: Move indirect_ring_state disable earlier in init cycle. (Daniele)
Julia INTEL (3):
drm/xe: Enable Wa_14025515070
Reapply "drm/xe/xe2: Enable Indirect Ring State support for Xe2" Revert "drm/xe/xe3p_xpc: Enable Indirect Ring State for xe3p_xpc"
drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 + drivers/gpu/drm/xe/xe_guc.c | 6 ++++++ drivers/gpu/drm/xe/xe_guc_ads.c | 4 ++++ drivers/gpu/drm/xe/xe_pci.c | 2 +- drivers/gpu/drm/xe/xe_rtp_helpers.h | 4 ++++ drivers/gpu/drm/xe/xe_wa_oob.rules | 7 +++++++ 6 files changed, 23 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0
PATCH v4 1/3 drm/xe: Enable Wa_14025515070
Corrects a failure on context switch. On registration of context with indirect ring state will correct state of targeted and idle command streamers.
If Wa is unavailable, notify and disable indirect_ring_state.
Added additional XE_RTP_PASTE macros for expansion of longer rules.
--- drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 + drivers/gpu/drm/xe/xe_guc.c | 6 ++++++ drivers/gpu/drm/xe/xe_guc_ads.c | 4 ++++ drivers/gpu/drm/xe/xe_rtp_helpers.h | 4 ++++ drivers/gpu/drm/xe/xe_wa_oob.rules | 7 +++++++ 5 files changed, 22 insertions(+)
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
@@ -496,6 +496,7 @@ enum xe_guc_klv_ids {GUC_WA_KLV_WAKE_POWER_DOMAINS_FOR_OUTBOUND_MMIO =0x900a ,GUC_WA_KLV_RESET_BB_STACK_PTR_ON_VF_SWITCH =0x900b ,GUC_WA_KLV_RESTORE_UNSAVED_MEDIA_CONTROL_REG =0x900c , + GUC_WA_KLV_CLR_CS_INDIRECT_RING_STATE_IF_IDLE_AT_CTX_REG = 0x900e, };#endif
drivers/gpu/drm/xe/xe_guc.c +6 -0
@@ -780,6 +780,12 @@ int xe_guc_init(struct xe_guc *guc)if (GUC_SUBMIT_VER (guc) <MAKE_GUC_VER (1 ,14 ,0 )) xe->info.has_page_reclaim_hw_assist = false; +/* Disable indirect_ring_state if missing GuC 70.53+ WA 14025515070. */ +if (!GUC_FIRMWARE_VER_AT_LEAST (guc,70 ,53 ,0 )) { + gt->info.has_indirect_ring_state =0 ; +xe_gt_notice (gt,"indirect ring state requires WA in GuC 70.53+\n" ); + } +if (IS_SRIOV_VF (xe)) { ret =devm_add_action_or_reset (xe->drm.dev, vf_guc_fini_hw, guc);if (ret)
drivers/gpu/drm/xe/xe_guc_ads.c +4 -0
@@ -360,6 +360,10 @@ static void guc_waklv_init(struct xe_guc_ads *ads)if (XE_GT_WA (gt,14020001231 ))guc_waklv_enable (ads,NULL ,0 , &offset, &remain,GUC_WORKAROUND_KLV_DISABLE_PSMI_INTERRUPTS_AT_C6_ENTRY_RESTORE_AT_EXIT ); +if (XE_GT_WA (gt,14025515070 ) &&GUC_FIRMWARE_VER_AT_LEAST (>->uc.guc,70 ,53 )) { +guc_waklv_enable (ads,NULL ,0 , &offset, &remain, +GUC_WA_KLV_CLR_CS_INDIRECT_RING_STATE_IF_IDLE_AT_CTX_REG ); + } size =guc_ads_waklv_size (ads) - remain;if (!size)
drivers/gpu/drm/xe/xe_rtp_helpers.h +4 -0
@@ -66,6 +66,10 @@#define XE_RTP_PASTE_10 (prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_9(prefix_, sep_, _XE_TUPLE_TAIL args_)#define XE_RTP_PASTE_11 (prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_10(prefix_, sep_, _XE_TUPLE_TAIL args_)#define XE_RTP_PASTE_12 (prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_11(prefix_, sep_, _XE_TUPLE_TAIL args_) +#define XE_RTP_PASTE_13 (prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_12(prefix_, sep_, _XE_TUPLE_TAIL args_) +#define XE_RTP_PASTE_14 (prefix_, sep_, args_) _XE_RTP_CONCAT(prefix_, FIRST_ARG args_) __XE_RTP_PASTE_SEP_ ## sep_ XE_RTP_PASTE_13(prefix_, sep_, _XE_TUPLE_TAIL args_) + +/* * XE_RTP_DROP_CAST - Drop cast to convert a compound statement to a initializer
drivers/gpu/drm/xe/xe_wa_oob.rules +7 -0
@@ -69,6 +69,13 @@ MEDIA_VERSION(3002), FUNC(xe_rtp_match_psmi_enabled) 16023683509 MEDIA_VERSION(2000), FUNC(xe_rtp_match_psmi_enabled) MEDIA_VERSION(3000), MEDIA_STEP(A0, B0), FUNC(xe_rtp_match_psmi_enabled) +14025515070 GRAPHICS_VERSION(2004) + MEDIA_VERSION_RANGE(1301, 3000) + MEDIA_VERSION(3002) + GRAPHICS_VERSION_RANGE(3000, 3001) + GRAPHICS_VERSION_RANGE(3003, 3005) + MEDIA_VERSION(3500) + GRAPHICS_VERSION(3510), GRAPHICS_STEP(A0, B0) 15015404425_disable PLATFORM(PANTHERLAKE), MEDIA_STEP(B0, FOREVER) 16026007364 MEDIA_VERSION(3000)
Signature · 1 line
2.51.0
PATCH v4 2/3 Reapply "drm/xe/xe2: Enable Indirect Ring State support for Xe2"
In reply to Julia FilipchukThis reverts commit 03d85ab36bcbcbe9dc962fccd3f8e54d7bb93b35.
Previously this was reverted due to failures on LRC context switch. Issues should be root-caused and resolved with GuC WA 14025515070. Now setting indirect ring state is available by default.
Note: Will be cleared if WA not available due to older GuC version.
--- drivers/gpu/drm/xe/xe_pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/xe_pci.c +1 -0
@@ -100,6 +100,7 @@ static const struct xe_graphics_desc graphics_xelpg = {#define XE2_GFX_FEATURES \ .has_asid = 1, \ .has_atomic_enable_pte_bit = 1, \ + .has_indirect_ring_state = 1, \ .has_range_tlb_inval = 1, \ .has_usm = 1, \ .has_64bit_timestamp = 1, \
Signature · 1 line
2.51.0
PATCH v4 3/3 Revert "drm/xe/xe3p_xpc: Enable Indirect Ring State for xe3p_xpc"
In reply to Julia FilipchukThis reverts commit 81e77c028848b7131d7653dd443a4049334a920b.
With indirect ring state now enabled for all XE2+ platforms this setting is already set by XE2_GFX_FEATURES macro.
--- drivers/gpu/drm/xe/xe_pci.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/xe/xe_pci.c +0 -1
@@ -124,7 +124,6 @@ static const struct xe_graphics_desc graphics_xe3p_lpg = {static const struct xe_graphics_desc graphics_xe3p_xpc = {XE2_GFX_FEATURES , - .has_indirect_ring_state =1 , .hw_engine_mask =GENMASK (XE_HW_ENGINE_BCS8 ,XE_HW_ENGINE_BCS1 ) |GENMASK (XE_HW_ENGINE_CCS3 ,XE_HW_ENGINE_CCS0 ),
Signature · 1 line
2.51.0