Skip to contentSkip to conversation

drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL

PATCH Superseded [email protected] 3 participants 6 messages May 25, 2024 – May 28, 2024

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL

From: John Harrison <[email protected]>

Enable another workaround that is implemented inside the GuC.

---
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h |  1 +
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c    | 32 ++++++++++++-------
 2 files changed, 21 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h +1 -0
index 525587cfe1af9..37ff539a6963d 100644
@@ -106,6 +106,7 @@ enum {
  */
 enum {
 	GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE				= 0x9001,
+	GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED		= 0x9002,
 };
 
 #endif /* _ABI_GUC_KLVS_ABI_H */
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +20 -12
index c606bb5e3b7b0..6c382785bc60b 100644
@@ -815,23 +815,23 @@ guc_capture_prep_lists(struct intel_guc *guc)
 	return PAGE_ALIGN(total_size);
 }
 
-/* Wa_14019159160 */
-static u32 guc_waklv_ra_mode(struct intel_guc *guc, u32 offset, u32 remain)
+static void guc_waklv_enable_simple(struct intel_guc *guc,
+				    u32 klv_id, u32 *offset, u32 *remain)
 {
 	u32 size;
 	u32 klv_entry[] = {
 		/* 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),
 		/* 0 dwords data */
 	};
 
 	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);
-
-	return size;
+	iosys_map_memcpy_to(&guc->ads_map, *offset, klv_entry, size);
+	*offset += size;
+	*remain -= size;
 }
 
 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);
 
 	/* Wa_14019159160 */
-	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
-		size = guc_waklv_ra_mode(guc, offset, remain);
-		offset += size;
-		remain -= size;
-	}
+	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
+		guc_waklv_enable_simple(guc,
+					GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE,
+					&offset, &remain);
+
+	/* Wa_14019882105 */
+	if ((GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 21, 1)) &&
+	    (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) ||
+	     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;
 	if (!size)
Signature · 1 line
2.43.2
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL

== Series Details ==

== Series Details ==

Series: drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL
URL : https://patchwork.freedesktop.org/series/134039/
State : warning

== Summary ==

Error: dim checkpatch failed
963da89c742d drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL
-:46: WARNING:AVOID_BUG: Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus recovery code (if feasible) instead of BUG() or variants #46: FILE: drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c:830:
+ GEM_BUG_ON(*remain < size);

total: 0 errors, 1 warnings, 0 checks, 61 lines checked

#3 lore raw

✗ Fi.CI.BAT: failure for drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915/guc: Enable w/a 14019882105 for DG2 and MTL
URL : https://patchwork.freedesktop.org/series/134039/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14816 -> Patchwork_134039v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_134039v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_134039v1, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/index.html

Participating hosts (40 -> 40)
------------------------------

Additional (2): fi-glk-j4005 fi-elk-e7500
Missing (2): fi-cfl-8109u fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_134039v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_module_load@load:
- bat-dg1-7: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-dg1-7/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-dg1-7/igt@[email protected]

Known issues
------------

Here are the changes found in Patchwork_134039v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-arls-3: NOTRUN -> [SKIP][3] ([i915#9318])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-glk-j4005: NOTRUN -> [SKIP][4] ([i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/fi-glk-j4005/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-glk-j4005: NOTRUN -> [SKIP][5] ([i915#4613]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/fi-glk-j4005/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-arls-3: NOTRUN -> [SKIP][6] ([i915#10213]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@gem_mmap@basic:
- bat-arls-3: NOTRUN -> [SKIP][7] ([i915#4083])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@gem_render_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][8] ([i915#10197] / [i915#10211] / [i915#4079])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@gem_tiled_blits@basic:
- bat-arls-3: NOTRUN -> [SKIP][9] ([i915#10196] / [i915#4077]) +2 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-arls-3: NOTRUN -> [SKIP][10] ([i915#10206] / [i915#4079])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@gem_tiled_pread_basic.html

* igt@i915_module_load@load:
- bat-dg2-9: [PASS][11] -> [DMESG-WARN][12] ([i915#10014])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-dg2-9/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-dg2-9/igt@[email protected]

* igt@i915_pm_rps@basic-api:
- bat-arls-3: NOTRUN -> [SKIP][13] ([i915#10209])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_addfb_basic@addfb25-x-tiled-legacy:
- bat-arls-3: NOTRUN -> [SKIP][14] ([i915#10200]) +9 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-glk-j4005: NOTRUN -> [SKIP][15] +10 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/fi-glk-j4005/igt@[email protected]
- bat-arls-3: NOTRUN -> [SKIP][16] ([i915#10202]) +1 other test skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_dsc@dsc-basic:
- bat-arls-3: NOTRUN -> [SKIP][17] ([i915#9886])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-arls-3: NOTRUN -> [SKIP][18] ([i915#10207])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_pm_backlight@basic-brightness:
- bat-arls-3: NOTRUN -> [SKIP][19] ([i915#9812])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_pm_rpm@basic-pci-d3-state:
- fi-elk-e7500: NOTRUN -> [SKIP][20] +24 other tests skip
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/fi-elk-e7500/igt@[email protected]

* igt@kms_psr@psr-primary-mmap-gtt:
- bat-arls-3: NOTRUN -> [SKIP][21] ([i915#9732]) +3 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-arls-3: NOTRUN -> [SKIP][22] ([i915#10208] / [i915#8809])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-fence-mmap:
- bat-arls-3: NOTRUN -> [SKIP][23] ([i915#10196] / [i915#3708] / [i915#4077]) +1 other test skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-fence-read:
- bat-arls-3: NOTRUN -> [SKIP][24] ([i915#10212] / [i915#3708])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-read:
- bat-arls-3: NOTRUN -> [SKIP][25] ([i915#10214] / [i915#3708])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-arls-3: NOTRUN -> [SKIP][26] ([i915#10216] / [i915#3708])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@load:
- bat-arls-3: [ABORT][27] ([i915#11041]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-arls-3/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-arls-3/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- {bat-mtlp-9}: [CRASH][29] ([i915#10911]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-mtlp-9/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-mtlp-9/igt@[email protected]

* igt@kms_busy@basic@modeset:
- {bat-mtlp-9}: [DMESG-WARN][31] ([i915#11009]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-mtlp-9/igt@kms_busy@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-mtlp-9/igt@kms_busy@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- {bat-mtlp-9}: [SKIP][33] ([i915#10580]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-mtlp-9/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-mtlp-9/igt@[email protected]

* igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-6:
- {bat-mtlp-9}: [DMESG-FAIL][35] ([i915#11009]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-mtlp-9/igt@kms_pipe_crc_basic@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-mtlp-9/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@hang-read-crc@pipe-c-dp-6:
- {bat-mtlp-9}: [FAIL][37] ([i915#10979]) -> [PASS][38] +2 other tests pass
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14816/bat-mtlp-9/igt@kms_pipe_crc_basic@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/bat-mtlp-9/igt@kms_pipe_crc_basic@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#10014]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10014
[i915#10196]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10196
[i915#10197]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10197
[i915#10200]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10200
[i915#10202]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10202
[i915#10206]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10206
[i915#10207]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10207
[i915#10208]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10208
[i915#10209]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10209
[i915#10211]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10211
[i915#10212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10212
[i915#10213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10213
[i915#10214]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10214
[i915#10216]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10216
[i915#10580]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10580
[i915#10911]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10911
[i915#10979]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10979
[i915#11009]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11009
[i915#11041]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11041
[i915#2190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/2190
[i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
[i915#4213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#8809]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8809
[i915#9318]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9318
[i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
[i915#9812]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9812
[i915#9886]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9886

Build changes
-------------

* Linux: CI_DRM_14816 -> Patchwork_134039v1

CI-20190529: 20190529
CI_DRM_14816: 573842e9ab57ccd8d6bb68ad55ed2e012e3d5d2f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7871: 1d7b961235e345db20933c057f265898e2e96fd2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_134039v1: 573842e9ab57ccd8d6bb68ad55ed2e012e3d5d2f @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_134039v1/index.html

#4 lore raw
In reply to [email protected]
Quoted 62 lines · On Fri, May 24, 2024 at 06:41:20PM -0700, [email protected] wrote:

From: John Harrison <[email protected]>

Enable another workaround that is implemented inside the GuC.

---
 drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h |  1 +
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c    | 32 ++++++++++++-------
 2 files changed, 21 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h +1 -0
index 525587cfe1af9..37ff539a6963d 100644
@@ -106,6 +106,7 @@ enum {
  */
 enum {
 	GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE				= 0x9001,
+	GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED		= 0x9002,
 };
 
 #endif /* _ABI_GUC_KLVS_ABI_H */
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +7 -8
index c606bb5e3b7b0..6c382785bc60b 100644
@@ -815,23 +815,23 @@ guc_capture_prep_lists(struct intel_guc *guc)
 	return PAGE_ALIGN(total_size);
 }
 
-/* Wa_14019159160 */
-static u32 guc_waklv_ra_mode(struct intel_guc *guc, u32 offset, u32 remain)
+static void guc_waklv_enable_simple(struct intel_guc *guc,
+				    u32 klv_id, u32 *offset, u32 *remain)
 {
 	u32 size;
 	u32 klv_entry[] = {
 		/* 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),
 		/* 0 dwords data */
 	};
 
 	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);
-
-	return size;
+	iosys_map_memcpy_to(&guc->ads_map, *offset, klv_entry, size);
+	*offset += size;
+	*remain -= size;
 }
 
 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);
 
 	/* Wa_14019159160 */
-	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {

drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c static void guc_waklv_init(struct intel_guc *guc) · line 858

Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +6 -4
-		size = guc_waklv_ra_mode(guc, offset, remain);
-		offset += size;
-		remain -= size;
-	}
+	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
+		guc_waklv_enable_simple(guc,
+					GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE,
+					&offset, &remain);
+
+	/* Wa_14019882105 */

Is this the right number? When I look up Wa_14019882105 in the workaround database, it only lists it as being relevant to A steppings of G:20.04. I don't see entries for 12.70/12.71. Did it go by a different lineage number on the older platforms?

Also, I notice the Wa_14019159160 we had just above this workaround is missing handling for graphics version 12.74.

Matt

Quoted 13 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +7 -0
+	if ((GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 21, 1)) &&
+	    (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) ||
+	     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;
 	if (!size)
Signature · 1 line
2.43.2
Signature · 4 lines
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
#5 lore raw
Quoted 61 lines · Matt Roper
Quoted 60 lines · On Fri, May 24, 2024 at 06:41:20PM -0700, [email protected] wrote:

From: John Harrison <[email protected]>

Enable another workaround that is implemented inside the GuC.

---
  drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h |  1 +
  drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c    | 32 ++++++++++++-------
  2 files changed, 21 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h +1 -0
index 525587cfe1af9..37ff539a6963d 100644
@@ -106,6 +106,7 @@ enum {
   */
  enum {
  	GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE				= 0x9001,
+	GUC_WORKAROUND_KLV_BLOCK_INTERRUPTS_WHEN_MGSR_BLOCKED		= 0x9002,
  };
 
  #endif /* _ABI_GUC_KLVS_ABI_H */
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +7 -7
index c606bb5e3b7b0..6c382785bc60b 100644
@@ -815,23 +815,23 @@ guc_capture_prep_lists(struct intel_guc *guc)
  	return PAGE_ALIGN(total_size);
  }
 
-/* Wa_14019159160 */
-static u32 guc_waklv_ra_mode(struct intel_guc *guc, u32 offset, u32 remain)
+static void guc_waklv_enable_simple(struct intel_guc *guc,
+				    u32 klv_id, u32 *offset, u32 *remain)
  {
  	u32 size;
  	u32 klv_entry[] = {
  		/* 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),
  		/* 0 dwords data */
  	};
 
  	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);
-
-	return size;
+	iosys_map_memcpy_to(&guc->ads_map, *offset, klv_entry, size);
+	*offset += size;
+	*remain -= size;
  }
 
  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);
 
Quoted 16 lines

drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c static void guc_waklv_init(struct intel_guc *guc) · line 858

Quoted 12 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +6 -5
  	/* Wa_14019159160 */
-	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
-		size = guc_waklv_ra_mode(guc, offset, remain);
-		offset += size;
-		remain -= size;
-	}
+	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
+		guc_waklv_enable_simple(guc,
+					GUC_WORKAROUND_KLV_SERIALIZED_RA_MODE,
+					&offset, &remain);
+
+	/* Wa_14019882105 */

Is this the right number? When I look up Wa_14019882105 in the workaround database, it only lists it as being relevant to A steppings of G:20.04. I don't see entries for 12.70/12.71. Did it go by a different lineage number on the older platforms?

Argh. Copied the wrong number. 2105 is the Xe version, the Gen12 version is 16021333562. I think it is two separate actual issues, hence two different w/a numbers, but the w/a itself is the same for both. Hmm, looks ike 3562 should also be enabled for 12.74. Not sure how I missed that, unless that is a recent update?

Quoted 3 lines

Also, I notice the Wa_14019159160 we had just above this workaround is missing handling for graphics version 12.74.

12.74 is ARL? I think extending that is on my todo list as well. I have just been leaving updates to 160 until later because that one is horrific. It needs extending to DG2 as well but a whole bunch of tests start to fail when it is enabled because they need to be re-written to cope with the broken hardware.

John.

Quoted 17 lines

Matt

Quoted 13 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +7 -0
+	if ((GUC_FIRMWARE_VER(guc) >= MAKE_GUC_VER(70, 21, 1)) &&
+	    (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) ||
+	     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;
  	if (!size)
Signature · 1 line
2.43.2