[PATCH 1/3] drm/xe/xe2_hpg: Add set of workarounds
Matt Roper
matthew.d.roper at intel.com
Thu May 29 20:55:48 UTC 2025
On Thu, May 29, 2025 at 05:35:32PM +0530, Dnyaneshwar Bhadane wrote:
> From: Shekhar Chauhan <shekhar.chauhan at intel.com>
>
> Add set of workarounds for xe2_hpg.
>
> Signed-off-by: Shekhar Chauhan <shekhar.chauhan at intel.com>
> Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane at intel.com>
> ---
> drivers/gpu/drm/xe/xe_wa.c | 56 +++++++++++++++++++++---------
> drivers/gpu/drm/xe/xe_wa_oob.rules | 5 +--
> 2 files changed, 42 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> index 67196baa4249..11c1fe3b2ea4 100644
> --- a/drivers/gpu/drm/xe/xe_wa.c
> +++ b/drivers/gpu/drm/xe/xe_wa.c
> @@ -489,8 +489,8 @@ static const struct xe_rtp_entry_sr engine_was[] = {
> XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
> },
> - { XE_RTP_NAME("18034896535, 16021540221"), /* 16021540221: GRAPHICS_STEP(A0, B0) */
> - XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004),
> + { XE_RTP_NAME("16021540221"),
> + XE_RTP_RULES(GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0),
I see we broke out the Xe2_HPG handling of Wa_18034896535 into a
separate rule, but we seem to have lost some of the 20.04 handling in
the process. Although Wa_16021540221 only applies to A-step of 20.04,
Wa_18034896535 still applies to all steppings.
> FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(ROW_CHICKEN4, DISABLE_TDL_PUSH))
> },
> @@ -533,31 +533,38 @@ static const struct xe_rtp_entry_sr engine_was[] = {
> /* Xe2_HPG */
>
> { XE_RTP_NAME("16018712365"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, XE2_ALLOC_DPA_STARVE_FIX_DIS))
> },
> { XE_RTP_NAME("16018737384"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION(2001),
> + FUNC(xe_rtp_match_first_render_or_compute)),
It looks like this diff was just line wrapping with no function change.
However looking at the workaround itself, this is one of the rare ones
that the hardware team classifies as "driver change required" rather
than "workaround." I.e., it means they've decided to make the
suggestion "permanent" not just for one specific platform, but also for
all future platforms as well (and it won't show up separately in the
workaround database for those future platforms).
So this should probably turn into
GRAPHICS_VERSION_RANGE(2001, XE_RTP_END_VERSION_UNDEFINED) so that it
continues on forever. So that will make sure it properly covers 20.01,
20.02, 20.04, 30.xx, and anything else that comes after.
If you want, this could be an independent patch since it's technically
not specific to the 20.02 version as the other changes in this patch
are.
> XE_RTP_ACTIONS(SET(ROW_CHICKEN, EARLY_EOT_DIS))
> },
> { XE_RTP_NAME("14019988906"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FLSH_IGNORES_PSD))
> },
> { XE_RTP_NAME("14019877138"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(XEHP_PSS_CHICKEN, FD_END_COLLECT))
> },
> { XE_RTP_NAME("14020338487"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION(2001),
It looks like this one should apply to 20.02 as well.
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
> },
> { XE_RTP_NAME("18032247524"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, SEQUENTIAL_ACCESS_UPGRADE_DISABLE))
> },
> { XE_RTP_NAME("14018471104"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0_UDW, ENABLE_SMP_LD_RENDER_SURFACE_CONTROL))
> },
> /*
> @@ -566,7 +573,7 @@ static const struct xe_rtp_entry_sr engine_was[] = {
> * apply this to all engines for simplicity.
> */
> { XE_RTP_NAME("16021639441"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002)),
> XE_RTP_ACTIONS(SET(CSFE_CHICKEN1(0),
> GHWSP_CSB_REPORT_DIS |
> PPHWSP_CSB_AND_TIMESTAMP_REPORT_DIS,
> @@ -578,13 +585,24 @@ static const struct xe_rtp_entry_sr engine_was[] = {
> XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, WR_REQ_CHAINING_DIS))
> },
> { XE_RTP_NAME("14021402888"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
> XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN7, CLEAR_OPTIMIZATION_DISABLE))
> },
> - { XE_RTP_NAME("14021821874"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), FUNC(xe_rtp_match_first_render_or_compute)),
> + { XE_RTP_NAME("14021821874, 14022954250"),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> XE_RTP_ACTIONS(SET(TDL_TSL_CHICKEN, STK_ID_RESTRICT))
> },
> + { XE_RTP_NAME("14019322943"),
> + XE_RTP_RULES(GRAPHICS_VERSION(2002), GRAPHICS_STEP(A0, B0),
I see this one as only applying to 20.04 A-step in the database, not 20.02.
> + FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_ACTIONS(SET(LSC_CHICKEN_BIT_0, TGM_WRITE_EOM_FORCE))
> + },
> + { XE_RTP_NAME("18034896535"),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002),
> + FUNC(xe_rtp_match_first_render_or_compute)),
> + XE_RTP_ACTIONS(SET(ROW_CHICKEN4, DISABLE_TDL_PUSH))
> + },
>
> /* Xe2_LPM */
>
> @@ -774,7 +792,7 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
> XE_RTP_ACTIONS(SET(INSTPM(RENDER_RING_BASE), ENABLE_SEMAPHORE_POLL_BIT))
> },
> { XE_RTP_NAME("18033852989"),
> - XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2004), ENGINE_CLASS(RENDER)),
> + XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
> XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN1, DISABLE_BOTTOM_CLIP_RECTANGLE_TEST))
> },
> { XE_RTP_NAME("14021567978"),
> @@ -807,7 +825,7 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
> XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_SF_ROUND_NEAREST_EVEN))
> },
> { XE_RTP_NAME("14019386621"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
> XE_RTP_ACTIONS(SET(VF_SCRATCHPAD, XE2_VFG_TED_CREDIT_INTERFACE_DISABLE))
> },
> { XE_RTP_NAME("14020756599"),
> @@ -824,13 +842,17 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
> DIS_AUTOSTRIP))
> },
> { XE_RTP_NAME("15016589081"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
> XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
> },
> { XE_RTP_NAME("22021007897"),
> - XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
> + XE_RTP_RULES(GRAPHICS_VERSION_RANGE(2001, 2002), ENGINE_CLASS(RENDER)),
> XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN4, SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE))
> },
> + { XE_RTP_NAME("18033852989"),
> + XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
> + XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN1, DISABLE_BOTTOM_CLIP_RECTANGLE_TEST))
> + },
>
> /* Xe3_LPG */
> { XE_RTP_NAME("14021490052"),
> diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
> index 9efc5accd43d..efdeb55cd6a8 100644
> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
> @@ -30,10 +30,11 @@
> GRAPHICS_VERSION(2004)
> 13011645652 GRAPHICS_VERSION(2004)
> GRAPHICS_VERSION(3001)
> -14022293748 GRAPHICS_VERSION(2001)
> +14022293748 GRAPHICS_VERSION_RANGE(2001, 2002)
> GRAPHICS_VERSION(2004)
> GRAPHICS_VERSION_RANGE(3000, 3001)
> -22019794406 GRAPHICS_VERSION(2001)
> + GRAPHICS_VERSION(3003)
While correct, I think the 30.03 change here might have belonged in a
different patch, not the Xe2_HPG patch here.
Matt
> +22019794406 GRAPHICS_VERSION_RANGE(2001, 2002)
> GRAPHICS_VERSION(2004)
> GRAPHICS_VERSION_RANGE(3000, 3001)
> 22019338487 MEDIA_VERSION(2000)
> --
> 2.34.1
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-xe
mailing list