From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: John Harrison <john.c.harrison@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/xe/lnl: Apply GuC Wa_13011645652
Date: Tue, 16 Apr 2024 22:36:09 -0700 [thread overview]
Message-ID: <4eb15074-e8d7-4882-8d69-ea36aafbf404@intel.com> (raw)
In-Reply-To: <20d39c77-2a8f-4512-a352-b0b02eff0d35@intel.com>
On 4/16/2024 5:51 PM, John Harrison wrote:
> On 4/16/2024 12:41, Vinay Belgaumkar wrote:
>> Enable WA for a bug that could cause the C6 state machine to hang
>> during RC6 exit.
>>
>> v2: Add comment clarifying the WA (John H)
>>
>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> ---
>> drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 +
>> drivers/gpu/drm/xe/xe_guc_ads.c | 34 +++++++++++++++++++++++++++
>> drivers/gpu/drm/xe/xe_wa_oob.rules | 1 +
>> 3 files changed, 36 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
>> b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
>> index 0972113f6b81..511cf974d585 100644
>> --- a/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
>> +++ b/drivers/gpu/drm/xe/abi/guc_klvs_abi.h
>> @@ -326,6 +326,7 @@ enum xe_guc_klv_ids {
>> GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED = 0x9002,
>> 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,
>> };
>> #endif
>> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c
>> b/drivers/gpu/drm/xe/xe_guc_ads.c
>> index 678ece366056..4e6fc69a4710 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
>> @@ -282,6 +282,33 @@ static size_t calculate_golden_lrc_size(struct
>> xe_guc_ads *ads)
>> return total_size;
>> }
>> +static void guc_waklv_enable_one_word(struct xe_guc_ads *ads,
>> + enum xe_guc_klv_ids klv_id,
>> + u32 value,
>> + u32 *offset, u32 *remain)
>> +{
>> + u32 size;
>> + u32 klv_entry[] = {
>> + /* 16:16 key/length */
>> + FIELD_PREP(GUC_KLV_0_KEY, klv_id) |
>> + FIELD_PREP(GUC_KLV_0_LEN, 1),
>> + value,
>> + /* 1 dword data */
>> + };
>> +
>> + size = sizeof(klv_entry);
>> +
>> + if (*remain < size) {
>> + drm_warn(&ads_to_xe(ads)->drm,
>> + "w/a klv buffer too small to add klv id %d\n", klv_id);
>> + } else {
>> + xe_map_memcpy_to(ads_to_xe(ads), ads_to_map(ads), *offset,
>> + klv_entry, size);
>> + *offset += size;
>> + *remain -= size;
>> + }
>> +}
>> +
>> static void guc_waklv_enable_simple(struct xe_guc_ads *ads,
>> enum xe_guc_klv_ids klv_id, u32 *offset, u32
>> *remain)
>> {
>> @@ -327,6 +354,13 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
>> GUC_WORKAROUND_KLV_ID_DISABLE_MTP_DURING_ASYNC_COMPUTE,
>> &offset, &remain);
>> + /* GuC will restore register 0xB04 to the default HW value of
>> 0xC40 */
> This reads to me like 0xC40 is hard coded in the GuC. I would prefer
> something like "On RC6 exit, GuC will write register 0xB04 with the
> value provided. The default value for 0xB04 in bspec is 0xC40, so use
> that."
Ok.
>
> John.
>
>> + if (XE_WA(gt, 13011645652))
>> + guc_waklv_enable_one_word(ads,
>> + GUC_WA_KLV_NP_RD_WRITE_TO_CLEAR_RCSM_AT_CGP_LATE_RESTORE,
>> + 0xC40,
>> + &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 eb647d5a1e16..12fe88796a49 100644
>> --- a/drivers/gpu/drm/xe/xe_wa_oob.rules
>> +++ b/drivers/gpu/drm/xe/xe_wa_oob.rules
>> @@ -26,3 +26,4 @@
>> MEDIA_VERSION(2000)
>> 16022287689 GRAPHICS_VERSION(2001)
>> GRAPHICS_VERSION(2004)
>> +13011645652 GRAPHICS_VERSION(2004)
>
next prev parent reply other threads:[~2024-04-17 5:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-16 19:41 [PATCH v2] drm/xe/lnl: Apply GuC Wa_13011645652 Vinay Belgaumkar
2024-04-16 19:57 ` ✓ CI.Patch_applied: success for drm/xe/lnl: Apply GuC Wa_13011645652 (rev2) Patchwork
2024-04-16 19:57 ` ✓ CI.checkpatch: " Patchwork
2024-04-16 19:58 ` ✓ CI.KUnit: " Patchwork
2024-04-16 20:09 ` ✓ CI.Build: " Patchwork
2024-04-16 20:12 ` ✓ CI.Hooks: " Patchwork
2024-04-16 20:13 ` ✓ CI.checksparse: " Patchwork
2024-04-16 20:54 ` ✓ CI.BAT: " Patchwork
2024-04-17 0:51 ` [PATCH v2] drm/xe/lnl: Apply GuC Wa_13011645652 John Harrison
2024-04-17 5:36 ` Belgaumkar, Vinay [this message]
2024-04-18 4:55 ` ✓ CI.FULL: success for drm/xe/lnl: Apply GuC Wa_13011645652 (rev2) 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=4eb15074-e8d7-4882-8d69-ea36aafbf404@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.c.harrison@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.