[PATCH] drm/xe: Move Wa 1607983814 to oob
Matt Roper
matthew.d.roper at intel.com
Tue Oct 29 19:40:55 UTC 2024
On Tue, Oct 29, 2024 at 12:32:58PM -0700, Lucas De Marchi wrote:
> needs_wa_1607983814() predates wa_oob, so it was not being printed
> in /sys/kernel/debug/dri/0/*/workarounds. Port it to OOB rules.
> This makes the WA show up in debugfs. For TGL:
>
> OOB Workarounds
> 22012773006
> 1409600907
> 1607983814
>
> Eventually the RTP infra may add support for writing registers in a
> loop, which would allow to keep track of the registers as well. But for
> now, just listing it as OOB workaround is already an improvement.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_ads.c | 11 ++---------
> drivers/gpu/drm/xe/xe_wa_oob.rules | 1 +
> 2 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
> index a196c4fb90fc9..00945caf49ff4 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
> @@ -232,11 +232,6 @@ static size_t guc_ads_size(struct xe_guc_ads *ads)
> guc_ads_private_data_size(ads);
> }
>
> -static bool needs_wa_1607983814(struct xe_device *xe)
> -{
> - return GRAPHICS_VERx100(xe) < 1250;
> -}
> -
> static size_t calculate_regset_size(struct xe_gt *gt)
> {
> struct xe_reg_sr_entry *sr_entry;
> @@ -251,7 +246,7 @@ static size_t calculate_regset_size(struct xe_gt *gt)
>
> count += ADS_REGSET_EXTRA_MAX * XE_NUM_HW_ENGINES;
>
> - if (needs_wa_1607983814(gt_to_xe(gt)))
> + if (XE_WA(gt, 1607983814))
> count += LNCFCMOCS_REG_COUNT;
>
> return count * sizeof(struct guc_mmio_reg);
> @@ -710,7 +705,6 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
> struct iosys_map *regset_map,
> struct xe_hw_engine *hwe)
> {
> - struct xe_device *xe = ads_to_xe(ads);
> struct xe_hw_engine *hwe_rcs_reset_domain =
> xe_gt_any_hw_engine_by_reset_domain(hwe->gt, XE_ENGINE_CLASS_RENDER);
> struct xe_reg_sr_entry *entry;
> @@ -746,8 +740,7 @@ static unsigned int guc_mmio_regset_write(struct xe_guc_ads *ads,
> RING_FORCE_TO_NONPRIV(hwe->mmio_base, i),
> count++);
>
> - /* Wa_1607983814 */
> - if (needs_wa_1607983814(xe) && hwe->class == XE_ENGINE_CLASS_RENDER) {
> + if (XE_WA(hwe->gt, 1607983814) && hwe->class == XE_ENGINE_CLASS_RENDER) {
> for (i = 0; i < LNCFCMOCS_REG_COUNT; i++) {
> guc_mmio_regset_write_one(ads, regset_map,
> XELP_LNCFCMOCS(i), count++);
> diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
> index bcd04464b85e8..d4ddfcdbe9370 100644
> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
> @@ -41,3 +41,4 @@
> no_media_l3 MEDIA_VERSION(3000)
> 14022866841 GRAPHICS_VERSION(3000), GRAPHICS_STEP(A0, B0)
> MEDIA_VERSION(3000), MEDIA_STEP(A0, B0)
> +1607983814 GRAPHICS_VERSION_RANGE(1200, 1210)
> --
> 2.47.0
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the Intel-xe
mailing list