Skip to contentSkip to conversation

drm/xe/guc: Enable w/a 14022293748 and 22019794406

PATCH Superseded Julia Filipchuk 2 participants 4 messages Jul 22, 2024

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/xe/guc: Enable w/a 14022293748 and 22019794406

Enable workarounds for HW bug where render engine reset fails.

v2: Enable KLV for either workarrounds (feedback from Lucas De Marchi)

---
This patch is for testing KLV workarrounds.

 drivers/gpu/drm/xe/abi/guc_klvs_abi.h | 1 +
 drivers/gpu/drm/xe/xe_guc_ads.c       | 5 +++++
 drivers/gpu/drm/xe/xe_uc_fw.c         | 4 ++--
 drivers/gpu/drm/xe/xe_wa_oob.rules    | 2 ++
 4 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/abi/guc_klvs_abi.h +1 -0
index 8f9f60b28306..6b30743a2f6c 100644
@@ -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
drivers/gpu/drm/xe/xe_guc_ads.c +5 -0
index 1c60b685dbc6..d27dd4f21eeb 100644
@@ -367,6 +367,11 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
 					  0xC40,
 					  &offset, &remain);
 
+	if (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;
drivers/gpu/drm/xe/xe_uc_fw.c +2 -2
index c902f4a10f44..d145ce77008e 100644
@@ -105,8 +105,8 @@ struct fw_blobs_by_type {
 };
 
 #define XE_GUC_FIRMWARE_DEFS(fw_def, mmp_ver, major_ver)			\
-	fw_def(BATTLEMAGE,	major_ver(intel-ci/xe,	guc,	bmg,	70, 24, 0))	\
-	fw_def(LUNARLAKE,	major_ver(intel-ci/xe,	guc,	lnl,	70, 24, 0))	\
+	fw_def(BATTLEMAGE,	major_ver(intel-ci/xe,	guc,	bmg,	70, 29, 0))	\
+	fw_def(LUNARLAKE,	major_ver(intel-ci/xe,	guc,	lnl,	70, 29, 0))	\
 	fw_def(METEORLAKE,	major_ver(i915,	guc,	mtl,	70, 19, 2))	\
 	fw_def(PVC,		mmp_ver(intel-ci/xe, guc, pvc,	70, 24, 0))	\
 	fw_def(DG2,		major_ver(i915,	guc,	dg2,	70, 19, 2))	\
drivers/gpu/drm/xe/xe_wa_oob.rules +2 -0
index 540d38603f32..b0d7d4114967 100644
@@ -27,6 +27,8 @@
 16022287689	GRAPHICS_VERSION(2001)
 		GRAPHICS_VERSION(2004)
 13011645652	GRAPHICS_VERSION(2004)
+14022293748	GRAPHICS_VERSION(2004)
+22019794406	GRAPHICS_VERSION(2004)
 22019338487	MEDIA_VERSION(2000)
 		GRAPHICS_VERSION(2001)
 22019338487_display	PLATFORM(LUNARLAKE)
Signature · 1 line
2.45.2
#1 lore raw

✓ CI.Patch_applied: success for drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)

== Series Details ==

== Series Details ==

Series: drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)
URL : https://patchwork.freedesktop.org/series/136307/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 3c91f8fc142c drm-tip: 2024y-07m-22d-20h-55m-39s UTC integration manifest === git am output follows ===
Applying: drm/xe/guc: Enable w/a 14022293748 and 22019794406

#2 lore raw

✗ CI.checkpatch: warning for drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)

In reply to Julia Filipchuk
== Series Details ==

== Series Details ==

Series: drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)
URL : https://patchwork.freedesktop.org/series/136307/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master 5ce3e132caaa5b45e5e50201b574a097d130967c
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 09c72b850a0c58892cb16a2d794f3036b9a00e52

Author: Julia Filipchuk <[email protected]>
Date:   Mon Jul 22 13:56:08 2024 -0700

drm/xe/guc: Enable w/a 14022293748 and 22019794406

Enable workarounds for HW bug where render engine reset fails.

v2: Enable KLV for either workarrounds (feedback from Lucas De Marchi)

+ /mt/dim checkpatch 3c91f8fc142cf0abea652fac341711086d1f40c9 drm-intel 09c72b850a0c drm/xe/guc: Enable w/a 14022293748 and 22019794406 -:50: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #50: FILE: drivers/gpu/drm/xe/xe_uc_fw.c:108:
+ fw_def(BATTLEMAGE, major_ver(intel-ci/xe, guc, bmg, 70, 29, 0)) \
^

-:50: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #50: FILE: drivers/gpu/drm/xe/xe_uc_fw.c:108:
+ fw_def(BATTLEMAGE, major_ver(intel-ci/xe, guc, bmg, 70, 29, 0)) \
^

-:51: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #51: FILE: drivers/gpu/drm/xe/xe_uc_fw.c:109:
+ fw_def(LUNARLAKE, major_ver(intel-ci/xe, guc, lnl, 70, 29, 0)) \
^

-:51: CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #51: FILE: drivers/gpu/drm/xe/xe_uc_fw.c:109:
+ fw_def(LUNARLAKE, major_ver(intel-ci/xe, guc, lnl, 70, 29, 0)) \
^

total: 0 errors, 0 warnings, 4 checks, 36 lines checked

#3 lore raw

✗ CI.KUnit: failure for drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)

In reply to Julia Filipchuk
== Series Details ==

== Series Details ==

Series: drm/xe/guc: Enable w/a 14022293748 and 22019794406 (rev2)
URL : https://patchwork.freedesktop.org/series/136307/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig ERROR:root:../drivers/gpu/drm/xe/xe_device.c: In function ‘xe_file_close’:
../drivers/gpu/drm/xe/xe_device.c:149:20: error: ‘xe’ undeclared (first use in this function); did you mean ‘xef’?

  149 |  xe_pm_runtime_get(xe);
      |                    ^~
      |                    xef

../drivers/gpu/drm/xe/xe_device.c:149:20: note: each undeclared identifier is reported only once for each function it appears in make[7]: *** [../scripts/Makefile.build:244: drivers/gpu/drm/xe/xe_device.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [../scripts/Makefile.build:485: drivers/gpu/drm/xe] Error 2
make[5]: *** [../scripts/Makefile.build:485: drivers/gpu/drm] Error 2
make[4]: *** [../scripts/Makefile.build:485: drivers/gpu] Error 2
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [../scripts/Makefile.build:485: drivers] Error 2
make[3]: *** Waiting for unfinished jobs....
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
156 | u64 ioread64_lo_hi(const void __iomem *addr)

      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

make[2]: *** [/kernel/Makefile:1934: .] Error 2 make[1]: *** [/kernel/Makefile:240: __sub-make] Error 2
make: *** [Makefile:240: __sub-make] Error 2

[21:31:52] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
[21:31:57] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel