Commit 6ef07838 authored by John Harrison's avatar John Harrison

drm/i915/guc: Enable w/a 16021333562 for DG2, MTL and ARL

Enable another workaround that is implemented inside the GuC.

v2: Use the correct Gen12 w/a id rather than the Xe version (review
feedback from Matthew R) also extend to include ARL.
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarJulia Filipchuk <julia.filipchuk@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240528230515.479395-1-John.C.Harrison@Intel.com
parent ca1a4533
...@@ -106,6 +106,7 @@ enum { ...@@ -106,6 +106,7 @@ enum {
*/ */
enum { enum {
GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE = 0x9001, GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE = 0x9001,
GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED = 0x9002,
}; };
#endif /* _ABI_GUC_KLVS_ABI_H */ #endif /* _ABI_GUC_KLVS_ABI_H */
...@@ -815,23 +815,23 @@ guc_capture_prep_lists(struct intel_guc *guc) ...@@ -815,23 +815,23 @@ guc_capture_prep_lists(struct intel_guc *guc)
return PAGE_ALIGN(total_size); return PAGE_ALIGN(total_size);
} }
/* Wa_14019159160 */ static void guc_waklv_enable_simple(struct intel_guc *guc,
static u32 guc_waklv_ra_mode(struct intel_guc *guc, u32 offset, u32 remain) u32 klv_id, u32 *offset, u32 *remain)
{ {
u32 size; u32 size;
u32 klv_entry[] = { u32 klv_entry[] = {
/* 16:16 key/length */ /* 16:16 key/length */
FIELD_PREP(GUC_KLV_0_KEY, GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE) | FIELD_PREP(GUC_KLV_0_KEY, klv_id) |
FIELD_PREP(GUC_KLV_0_LEN, 0), FIELD_PREP(GUC_KLV_0_LEN, 0),
/* 0 dwords data */ /* 0 dwords data */
}; };
size = sizeof(klv_entry); size = sizeof(klv_entry);
GEM_BUG_ON(remain < size); GEM_BUG_ON(*remain < size);
iosys_map_memcpy_to(&guc->ads_map, offset, klv_entry, size); iosys_map_memcpy_to(&guc->ads_map, *offset, klv_entry, size);
*offset += size;
return size; *remain -= size;
} }
static void guc_waklv_init(struct intel_guc *guc) static void guc_waklv_init(struct intel_guc *guc)
...@@ -850,11 +850,19 @@ static void guc_waklv_init(struct intel_guc *guc) ...@@ -850,11 +850,19 @@ static void guc_waklv_init(struct intel_guc *guc)
remain = guc_ads_waklv_size(guc); remain = guc_ads_waklv_size(guc);
/* Wa_14019159160 */ /* Wa_14019159160 */
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) { if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
size = guc_waklv_ra_mode(guc, offset, remain); guc_waklv_enable_simple(guc,
offset += size; GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE,
remain -= size; &offset, &remain);
}
/* Wa_16021333562 */
if ((GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 21, 1)) &&
(IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)) ||
IS_MEDIA_GT_IP_RANGE(gt, IP_VER(13, 0), IP_VER(13, 0)) ||
IS_DG2(gt->i915)))
guc_waklv_enable_simple(guc,
GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED,
&offset, &remain);
size = guc_ads_waklv_size(guc) - remain; size = guc_ads_waklv_size(guc) - remain;
if (!size) if (!size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment