Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <john.c.harrison@intel.com>
To: Julia Filipchuk <julia.filipchuk@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/xe/guc: Enable w/a 14022293748 and 22019794406
Date: Fri, 2 Aug 2024 15:44:57 -0700	[thread overview]
Message-ID: <c5c3dfe2-dccd-45b7-8d48-ab7a8761e997@intel.com> (raw)
In-Reply-To: <20240802004017.3057708-4-julia.filipchuk@intel.com>

On 8/1/2024 17:40, Julia Filipchuk wrote:
> Enable workarounds for HW bug where render engine reset fails. Check
> firmware version supports the workarounds.
>
> v2: Enable KLV correctly for either workaround (Lucas)
> v4: Add check for minimum supported GuC firmware version. Enable w/a for
> hw version 20.01 too. (Daniele)
>
> Signed-off-by: Julia Filipchuk <julia.filipchuk@intel.com>
> ---
>   drivers/gpu/drm/xe/abi/guc_klvs_abi.h |  1 +
>   drivers/gpu/drm/xe/xe_guc_ads.c       | 12 ++++++++++++
>   drivers/gpu/drm/xe/xe_wa_oob.rules    |  4 ++++
>   3 files changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> index 8f9f60b28306..6b30743a2f6c 100644
> --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
> @@ -351,6 +351,7 @@ enum xe_guc_klv_ids {
>   	GUC_WORKAROUND_KLV_ID_GAM_PFQ_SHADOW_TAIL_POLLING				= 0x9005,
>   	GUC_WORKAROUND_KLV_ID_DISABLE_MTP_DURING_ASYNC_COMPUTE				= 0x9007,
>   	GUC_WA_KLV_NP_RD_WRITE_TO_CLEAR_RCSM_AT_CGP_LATE_RESTORE			= 0x9008,
> +	GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET				= 0x9009,
>   };
>   
>   #endif
> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
> index 1c60b685dbc6..ba70e6a81d88 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
> @@ -24,6 +24,7 @@
>   #include "xe_map.h"
>   #include "xe_mmio.h"
>   #include "xe_platform_types.h"
> +#include "xe_uc_fw.h"
>   #include "xe_wa.h"
>   
>   /* Slack of a few additional entries per engine */
> @@ -337,9 +338,14 @@ static void guc_waklv_enable_simple(struct xe_guc_ads *ads,
>   static void guc_waklv_init(struct xe_guc_ads *ads)
>   {
>   	struct xe_gt *gt = ads_to_gt(ads);
> +	struct xe_guc *guc = ads_to_guc(ads);
>   	u64 addr_ggtt;
>   	u32 offset, remain, size;
> +	u64 fw_ver;
>   
> +	xe_gt_assert(gt, guc->fw.type == XE_UC_FW_TYPE_GUC);
Not sure if this is necessary? If the ads -> guc -> fw route is broken 
to the extent of returning a HuC firmware or something then I think we 
have bigger problems than version checking a w/a flag.

> +
> +	fw_ver = GUC_FIRMWARE_VER(guc);
>   	offset = guc_ads_waklv_offset(ads);
>   	remain = guc_ads_waklv_size(ads);
>   
> @@ -367,6 +373,12 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
>   					  0xC40,
>   					  &offset, &remain);
>   
> +	if (fw_ver >= MAKE_VER(70, 29, 0) &&
Given the other patch set to bump the minimum required version to 
70.29.2, this version check is no longer required.

John.

> +		(XE_WA(gt, 14022293748) || XE_WA(gt, 22019794406)))
> +		guc_waklv_enable_simple(ads,
> +					GUC_WORKAROUND_KLV_ID_BACK_TO_BACK_RCS_ENGINE_RESET,
> +					&offset, &remain);
> +
>   	size = guc_ads_waklv_size(ads) - remain;
>   	if (!size)
>   		return;
> diff --git a/drivers/gpu/drm/xe/xe_wa_oob.rules b/drivers/gpu/drm/xe/xe_wa_oob.rules
> index 540d38603f32..5cf27ff27ce6 100644
> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
> @@ -27,6 +27,10 @@
>   16022287689	GRAPHICS_VERSION(2001)
>   		GRAPHICS_VERSION(2004)
>   13011645652	GRAPHICS_VERSION(2004)
> +14022293748	GRAPHICS_VERSION(2001)
> +		GRAPHICS_VERSION(2004)
> +22019794406	GRAPHICS_VERSION(2001)
> +		GRAPHICS_VERSION(2004)
>   22019338487	MEDIA_VERSION(2000)
>   		GRAPHICS_VERSION(2001)
>   22019338487_display	PLATFORM(LUNARLAKE)


  reply	other threads:[~2024-08-02 22:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02  0:40 [PATCH 0/2] drm/xe/guc: Enable w/a 14022293748 and 22019794406 Julia Filipchuk
2024-08-02  0:40 ` [PATCH 1/2] NOT_UPSTREAM/CI: drm/xe/guc: Release GuC v70.29.2 Julia Filipchuk
2024-08-02  0:40 ` [PATCH 1/2] NOT_UPSTREAM/CIdrm/xe/guc: " Julia Filipchuk
2024-08-02  0:40 ` [PATCH 2/2] drm/xe/guc: Enable w/a 14022293748 and 22019794406 Julia Filipchuk
2024-08-02 22:44   ` John Harrison [this message]
2024-08-02  0:45 ` ✓ CI.Patch_applied: success for drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev4) Patchwork
2024-08-02  0:46 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-02  0:47 ` ✓ CI.KUnit: success " Patchwork
2024-08-02  0:59 ` ✓ CI.Build: " Patchwork
2024-08-02  1:01 ` ✓ CI.Hooks: " Patchwork
2024-08-02  1:02 ` ✓ CI.checksparse: " Patchwork
2024-08-02  1:21 ` ✓ CI.BAT: " Patchwork
2024-08-02  4:07 ` ✗ CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5c3dfe2-dccd-45b7-8d48-ab7a8761e997@intel.com \
    --to=john.c.harrison@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=julia.filipchuk@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox