Skip to contentSkip to conversation

drm/xe/guc: Enable WA 14018913170

PATCH In review Karthik Poosa 3 participants 3 messages Jan 16, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/xe/guc: Enable WA 14018913170

The GuC handles the WA, the KMD just needs to set the flag to enable it on the appropriate platforms.

v2: Fixed CI checkpatch warning, alignment should match open parenthesis.

---
 drivers/gpu/drm/xe/xe_guc.c        | 13 +++++++++++++
 drivers/gpu/drm/xe/xe_guc_fwif.h   |  1 +
 drivers/gpu/drm/xe/xe_wa_oob.rules |  5 +++++
 3 files changed, 19 insertions(+)
drivers/gpu/drm/xe/xe_guc.c +13 -0
index 235d27b17ff9..5ecd9cd964de 100644
@@ -132,10 +132,15 @@ static u32 guc_ctl_ads_flags(struct xe_guc *guc)
 	return flags;
 }
 
+#define GUC_VER(maj, min, pat)	(((maj) << 16) | ((min) << 8) | (pat))
+
 static u32 guc_ctl_wa_flags(struct xe_guc *guc)
 {
 	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_gt *gt = guc_to_gt(guc);
+	struct xe_uc_fw *uc_fw = &guc->fw;
+	struct xe_uc_fw_version *version = &uc_fw->versions.found[XE_UC_FW_VER_COMPATIBILITY];
+
 	u32 flags = 0;
 
 	if (XE_WA(gt, 22012773006))
@@ -165,6 +170,14 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
 	if (XE_WA(gt, 1509372804))
 		flags |= GUC_WA_RENDER_RST_RC6_EXIT;
 
+	if (XE_WA(gt, 14018913170)) {
+		if (GUC_VER(version->major, version->minor, version->patch) >= GUC_VER(70, 7, 0))
+			flags |= GUC_WA_ENABLE_TSC_CHECK_ON_RC6;
+		else
+			drm_warn(&xe->drm, "can't apply WA 14018913170, GUC version expected >= 70.7.0, found %us %us %us\n",
+				 version->major, version->minor, version->patch);
+	}
+
 	return flags;
 }
 
drivers/gpu/drm/xe/xe_guc_fwif.h +1 -0
index 4dd5a88a7826..c281fdbfd2d6 100644
@@ -97,6 +97,7 @@ struct guc_update_exec_queue_policy {
 #define   GUC_WA_POLLCS			BIT(18)
 #define   GUC_WA_RENDER_RST_RC6_EXIT	BIT(19)
 #define   GUC_WA_RCS_REGS_IN_CCS_REGS_LIST	BIT(21)
+#define   GUC_WA_ENABLE_TSC_CHECK_ON_RC6	BIT(22)
 
 #define GUC_CTL_FEATURE			2
 #define   GUC_CTL_ENABLE_SLPC		BIT(2)
drivers/gpu/drm/xe/xe_wa_oob.rules +5 -0
index e73b84e01ea1..b138cbd51bdb 100644
@@ -17,3 +17,8 @@
 14019821291	MEDIA_VERSION_RANGE(1300, 2000)
 14015076503	MEDIA_VERSION(1300)
 16020292621	GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
+14018913170	GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
+		MEDIA_VERSION(2000), GRAPHICS_STEP(A0, A1)
+		GRAPHICS_VERSION_RANGE(1270, 1274)
+		MEDIA_VERSION(1300)
+		PLATFORM(DG2)
Signature · 1 line
2.25.1
#1 lore raw

✗ Fi.CI.BAT: failure for drm/xe/guc: Enable WA 14018913170 (rev3)

== Series Details ==

== Series Details ==

Series: drm/xe/guc: Enable WA 14018913170 (rev3)
URL : https://patchwork.freedesktop.org/series/128781/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14125 -> Patchwork_128781v3
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_128781v3, 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_128781v3/index.html

Participating hosts (39 -> 39)
------------------------------

Additional (1): bat-dg2-8
Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_suspend@basic-s3-without-i915:
- bat-rpls-2: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14125/bat-rpls-2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-rpls-2/igt@[email protected]

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-2:
- {bat-rpls-3}: [PASS][3] -> [FAIL][4] +5 other tests fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14125/bat-rpls-3/igt@kms_pipe_crc_basic@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-rpls-3/igt@kms_pipe_crc_basic@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s0@lmem0:
- bat-dg2-8: NOTRUN -> [INCOMPLETE][5] ([i915#9275])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@gem_exec_suspend@[email protected]

* igt@gem_mmap@basic:
- bat-dg2-8: NOTRUN -> [SKIP][6] ([i915#4083])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@gem_mmap_gtt@basic:
- bat-dg2-8: NOTRUN -> [SKIP][7] ([i915#4077]) +2 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-dg2-8: NOTRUN -> [SKIP][8] ([i915#4079]) +1 other test skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@gem_tiled_pread_basic.html

* igt@i915_pm_rps@basic-api:
- bat-dg2-8: NOTRUN -> [SKIP][9] ([i915#6621])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- bat-dg2-8: NOTRUN -> [SKIP][10] ([i915#6645])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-8: NOTRUN -> [SKIP][11] ([i915#5190])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-8: NOTRUN -> [SKIP][12] ([i915#4215] / [i915#5190])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_addfb_basic@framebuffer-vs-set-tiling:
- bat-dg2-8: NOTRUN -> [SKIP][13] ([i915#4212]) +7 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg2-8: NOTRUN -> [SKIP][14] ([i915#4103] / [i915#4213]) +1 other test skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-8: NOTRUN -> [SKIP][15] ([fdo#109285])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-8: NOTRUN -> [SKIP][16] ([i915#5274])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_pm_backlight@basic-brightness:
- bat-dg2-8: NOTRUN -> [SKIP][17] ([i915#5354])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg2-8: NOTRUN -> [SKIP][18] ([i915#3555])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- bat-dg2-8: NOTRUN -> [SKIP][19] ([i915#3708])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

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

* igt@prime_vgem@basic-write:
- bat-dg2-8: NOTRUN -> [SKIP][21] ([i915#3291] / [i915#3708]) +2 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-dg2-8/igt@[email protected]

#### Possible fixes ####

* igt@vgem_basic@unload:
- {bat-adls-6}: [INCOMPLETE][22] ([i915#10095]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14125/bat-adls-6/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_128781v3/bat-adls-6/igt@[email protected]

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

[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[i915#10095]: https://gitlab.freedesktop.org/drm/intel/issues/10095
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275
[i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732

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

* Linux: CI_DRM_14125 -> Patchwork_128781v3

CI-20190529: 20190529
CI_DRM_14125: fc429d95eec92e32db2ad6ae53f61587e3bdaf40 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7674: 7674
Patchwork_128781v3: fc429d95eec92e32db2ad6ae53f61587e3bdaf40 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

b425b3236648 drm/xe/guc: Enable WA 14018913170

== Logs ==

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

#2 lore raw
In reply to Karthik Poosa

Please post this patch to intel xe mailing list.

Regards,
Badal

Quoted 72 lines · Karthik Poosa

The GuC handles the WA, the KMD just needs to set the flag to enable it on the appropriate platforms.

v2: Fixed CI checkpatch warning, alignment should match open parenthesis.

---
  drivers/gpu/drm/xe/xe_guc.c        | 13 +++++++++++++
  drivers/gpu/drm/xe/xe_guc_fwif.h   |  1 +
  drivers/gpu/drm/xe/xe_wa_oob.rules |  5 +++++
  3 files changed, 19 insertions(+)
drivers/gpu/drm/xe/xe_guc.c +13 -0
index 235d27b17ff9..5ecd9cd964de 100644
@@ -132,10 +132,15 @@ static u32 guc_ctl_ads_flags(struct xe_guc *guc)
  	return flags;
  }
 
+#define GUC_VER(maj, min, pat)	(((maj) << 16) | ((min) << 8) | (pat))
+
  static u32 guc_ctl_wa_flags(struct xe_guc *guc)
  {
  	struct xe_device *xe = guc_to_xe(guc);
  	struct xe_gt *gt = guc_to_gt(guc);
+	struct xe_uc_fw *uc_fw = &guc->fw;
+	struct xe_uc_fw_version *version = &uc_fw->versions.found[XE_UC_FW_VER_COMPATIBILITY];
+
  	u32 flags = 0;
 
  	if (XE_WA(gt, 22012773006))
@@ -165,6 +170,14 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
  	if (XE_WA(gt, 1509372804))
  		flags |= GUC_WA_RENDER_RST_RC6_EXIT;
 
+	if (XE_WA(gt, 14018913170)) {
+		if (GUC_VER(version->major, version->minor, version->patch) >= GUC_VER(70, 7, 0))
+			flags |= GUC_WA_ENABLE_TSC_CHECK_ON_RC6;
+		else
+			drm_warn(&xe->drm, "can't apply WA 14018913170, GUC version expected >= 70.7.0, found %us %us %us\n",
+				 version->major, version->minor, version->patch);
+	}
+
  	return flags;
  }
 
drivers/gpu/drm/xe/xe_guc_fwif.h +1 -0
index 4dd5a88a7826..c281fdbfd2d6 100644
@@ -97,6 +97,7 @@ struct guc_update_exec_queue_policy {
  #define   GUC_WA_POLLCS			BIT(18)
  #define   GUC_WA_RENDER_RST_RC6_EXIT	BIT(19)
  #define   GUC_WA_RCS_REGS_IN_CCS_REGS_LIST	BIT(21)
+#define   GUC_WA_ENABLE_TSC_CHECK_ON_RC6	BIT(22)
 
  #define GUC_CTL_FEATURE			2
  #define   GUC_CTL_ENABLE_SLPC		BIT(2)
drivers/gpu/drm/xe/xe_wa_oob.rules +5 -0
index e73b84e01ea1..b138cbd51bdb 100644
@@ -17,3 +17,8 @@
  14019821291	MEDIA_VERSION_RANGE(1300, 2000)
  14015076503	MEDIA_VERSION(1300)
  16020292621	GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
+14018913170	GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
+		MEDIA_VERSION(2000), GRAPHICS_STEP(A0, A1)
+		GRAPHICS_VERSION_RANGE(1270, 1274)
+		MEDIA_VERSION(1300)
+		PLATFORM(DG2)