drm/xe: Add fake workaround to maintain backward compatible in MI_BATCH_BUFFER_START
Subsystems (2)
PATCH 1/1 drm/xe: Add fake workaround to maintain backward compatible in MI_BATCH_BUFFER_START
i915 has the same fake workaround to return MI_BATCH_BUFFER_START nested batch buffer behavior in DG2 and newer platforms to the same behavior as older platforms.
So here cleaning up TGL_NESTED_BB_EN in MI_MODE to disable third level chained batch buffer level.
Bspec: 45974, 45718
--- drivers/gpu/drm/xe/xe_rtp_types.h | 2 ++ drivers/gpu/drm/xe/xe_wa.c | 11 +++++++++++ 2 files changed, 13 insertions(+)
drivers/gpu/drm/xe/xe_rtp_types.h +2 -0
@@ -52,6 +52,8 @@ enum { XE_RTP_MATCH_FUNC, }; +#define IP_VERSION_FOREVER 9900 +/** struct xe_rtp_rule - match rule for processing entry */ struct xe_rtp_rule {u8 match_type;
drivers/gpu/drm/xe/xe_wa.c +11 -0
@@ -285,6 +285,17 @@ static const struct xe_rtp_entry lrc_was[] = { DG1_HZ_READ_SUPPRESSION_OPTIMIZATION_DISABLE, XE_RTP_FLAG(MASKED_REG)) }, + {XE_RTP_NAME ("FakeWaDisableNestedBBMode" ), +/* +* This is a "fake" workaround defined by software to ensure we +* maintain reliable, backward-compatible behavior for userspace with +* regards to how nested MI_BATCH_BUFFER_START commands are handled. +*/ +XE_RTP_RULES (GRAPHICS_VERSION_RANGE (1255 ,IP_VERSION_FOREVER )), +XE_RTP_CLR (RING_MI_MODE (0 ), +TGL_NESTED_BB_EN , +XE_RTP_FLAG (MASKED_REG ,ENGINE_BASE )) + }, {} };
Signature · 1 line
2.39.1
Quoted 20 lines · Jose Souza
i915 has the same fake workaround to return
MI_BATCH_BUFFER_STARTnested batch buffer behavior in DG2 and newer platforms to the same behavior as older platforms.So here cleaning up
TGL_NESTED_BB_ENinMI_MODEto disable third level chained batch buffer level.Bspec: 45974, 45718
Cc Matt Roper <[email protected]>Signed-off-by José Roberto de Souza <[email protected]>---
drivers/gpu/drm/xe/xe_rtp_types.h| 2 ++drivers/gpu/drm/xe/xe_wa.c| 11 +++++++++++2 files changed, 13 insertions(+)drivers/gpu/drm/xe/xe_rtp_types.h +0
-0
drivers/gpu/drm/xe/xe_rtp_types.h enum { · line 55
Quoted 4 lines
drivers/gpu/drm/xe/xe_rtp_types.h +1
-0@@ -52,6 +52,8 @@ enum { XE_RTP_MATCH_FUNC, }; +#define IP_VERSION_FOREVER 9900
there is already a define for this in this header.
Quoted 13 lines
drivers/gpu/drm/xe/xe_rtp_types.h +1
-0+/** struct xe_rtp_rule - match rule for processing entry */ struct xe_rtp_rule {u8 match_type;drivers/gpu/drm/xe/xe_wa.c +1
-0@@ -285,6 +285,17 @@ static const struct xe_rtp_entry lrc_was[] = { DG1_HZ_READ_SUPPRESSION_OPTIMIZATION_DISABLE, XE_RTP_FLAG(MASKED_REG)) }, + { XE_RTP_NAME("FakeWaDisableNestedBBMode"),
drivers/gpu/drm/xe/xe_wa.c static const struct xe_rtp_entry lrc_was[] = { · line 298
Quoted 10 lines
drivers/gpu/drm/xe/xe_wa.c +10
-0+/* +* This is a "fake" workaround defined by software to ensure we +* maintain reliable, backward-compatible behavior for userspace with +* regards to how nested MI_BATCH_BUFFER_START commands are handled. +*/ +XE_RTP_RULES (GRAPHICS_VERSION_RANGE (1255 ,IP_VERSION_FOREVER )), +XE_RTP_CLR (RING_MI_MODE (0 ), +TGL_NESTED_BB_EN , +XE_RTP_FLAG (MASKED_REG ,ENGINE_BASE )) + },
this conflicts with the changesto allow multiple actions in a single entry, but should be easy to fix.
I think we can leave this wa here, but until now we tried not to mix WAs with normal programming of the driver. Maybe just add a different table like lrc_additional_programming[]?
Lucas De Marchi