Skip to contentSkip to conversation

drm/i915/dg2: Add per-context control for Wa_22013059131

PATCH Superseded Jia Yao 4 participants 6 messages Apr 17 – Apr 28

Subsystems (4)

v3 of 13 Superseded Latest is v13 →

lore
Share & tools
lore

Jia Yao

author
#0 lore raw

PATCH v3 1/1 drm/i915/dg2: Add per-context control for Wa_22013059131

Wa_22013059131 sets FORCE_1_SUB_MESSAGE_PER_FRAGMENT in LSC_CHICKEN_BIT_0 at engine init, but this is known to cause GPU hangs in certain workloads. Add I915_CONTEXT_PARAM_WA_22013059131 so userspace that handles the workaround itself (e.g. by limiting SLM size) can set it to 1 to let the kernel know bit 15 programming is not needed for that context.

LSC_CHICKEN_BIT_0 is not context-saved by hardware, so the kernel restores the correct value on every context switch via the indirect context batchbuffer to avoid leaking state between contexts. The old unconditional application of Wa22013059131 in intel_workarounds.c is removed.

v3:
- Kernel-internal context will not change workaround settings

Bspec: 54833

Fixes 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine workarounds")
Cc Shuicheng Lin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maciej Plewka <[email protected]>
Cc Andi Shyti <[email protected]>
---
 drivers/gpu/drm/i915/gem/i915_gem_context.c   | 12 +++++
 .../gpu/drm/i915/gem/i915_gem_context_types.h |  1 +
 drivers/gpu/drm/i915/gt/intel_context_types.h |  1 +
 drivers/gpu/drm/i915/gt/intel_lrc.c           | 44 ++++++++++++++++++-
 drivers/gpu/drm/i915/gt/intel_workarounds.c   | 10 ++---
 include/uapi/drm/i915_drm.h                   | 10 +++++
 6 files changed, 72 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_context.c +12 -0
index 6ac0f23570f3..d24e449f1eb3 100644
@@ -911,6 +911,15 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
 			ret = -EINVAL;
 		break;
 
+	case I915_CONTEXT_PARAM_WA_22013059131:
+		if (args->size)
+			ret = -EINVAL;
+		else if (args->value)
+			pc->user_flags |= BIT(UCONTEXT_WA_22013059131);
+		else
+			pc->user_flags &= ~BIT(UCONTEXT_WA_22013059131);
+		break;
+
 	case I915_CONTEXT_PARAM_RECOVERABLE:
 		if (args->size)
 			ret = -EINVAL;
@@ -1003,6 +1012,9 @@ static int intel_context_set_gem(struct intel_context *ce,
 	if (test_bit(UCONTEXT_LOW_LATENCY, &ctx->user_flags))
 		__set_bit(CONTEXT_LOW_LATENCY, &ce->flags);
 
+	if (test_bit(UCONTEXT_WA_22013059131, &ctx->user_flags))
+		__set_bit(CONTEXT_WA_22013059131, &ce->flags);
+
 	return ret;
 }
 
drivers/gpu/drm/i915/gem/i915_gem_context_types.h +1 -0
index 0267c924634b..4efc0e758d3b 100644
@@ -338,6 +338,7 @@ struct i915_gem_context {
 #define UCONTEXT_RECOVERABLE		3
 #define UCONTEXT_PERSISTENCE		4
 #define UCONTEXT_LOW_LATENCY		5
+#define UCONTEXT_WA_22013059131		6
 
 	/**
 	 * @flags: small set of booleans
drivers/gpu/drm/i915/gt/intel_context_types.h +1 -0
index 10070ee4d74c..84011ce7c84d 100644
@@ -133,6 +133,7 @@ struct intel_context {
 #define CONTEXT_EXITING			13
 #define CONTEXT_LOW_LATENCY		14
 #define CONTEXT_OWN_STATE		15
+#define CONTEXT_WA_22013059131		16
 
 	struct {
 		u64 timeout_us;
drivers/gpu/drm/i915/gt/intel_lrc.c +43 -1

62 lines not on this page · raw message

drivers/gpu/drm/i915/gt/intel_workarounds.c +5 -5
index 24ea5d8d529c..ef6eea3ab597 100644
@@ -2840,7 +2840,11 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 	if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
 	    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0) ||
 	    IS_DG2(i915)) {
-		/* Wa_22014226127 */
+		/*
+		 * Wa_22014226127: Note that this workaround also needs to be
+		 * re-applied in intel_lrc.c when LSC_CHICKEN_BIT_0 is
+		 * re-written for Wa_22013059131.
+		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, DISABLE_D8_D16_COASLESCE);
 	}
 
@@ -2867,10 +2871,6 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 				     MAXREQS_PER_BANK,
 				     REG_FIELD_PREP(MAXREQS_PER_BANK, 2));
 
-		/* Wa_22013059131:dg2 */
-		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0,
-				FORCE_1_SUB_MESSAGE_PER_FRAGMENT);
-
 		/*
 		 * Wa_22012654132
 		 *
include/uapi/drm/i915_drm.h +10 -0
index 535cb68fdb5c..0f553bb12fb0 100644
@@ -2172,6 +2172,16 @@ struct drm_i915_gem_context_param {
  * Note that this is a debug API not available on production kernel builds.
  */
 #define I915_CONTEXT_PARAM_CONTEXT_IMAGE	0xf
+
+/*
+ * I915_CONTEXT_PARAM_WA_22013059131:
+ *
+ * Default value 0 means the kernel programs Wa_22013059131 for this context.
+ * Set to 1 to inform the kernel that userspace is taking responsibility for
+ * applying the preferred workaround implementation, so the kernel programming
+ * of LSC_CHICKEN_BIT_0 bit 15 is not needed for this context. DG2-G11 only.
+ */
+#define I915_CONTEXT_PARAM_WA_22013059131	0x10
 /* Must be kept compact -- no holes and well documented */
 
 	/** @value: Context parameter value to be set or queried */
Signature · 1 line
2.43.0
Reviewed-by Matt Roper on v3 1/1
#1 lore raw

This fix looks good from compute UMD perspective.

-----Original Message-----
From: Yao, Jia <[email protected]>
Sent: Friday, April 17, 2026 7:10 AM
To: [email protected]
Cc: Yao, Jia <[email protected]>; [email protected]; Lin, Shuicheng <[email protected]>; Roper, Matthew D <[email protected]>; Joonas Lahtinen <[email protected]>; Vivi, Rodrigo <[email protected]>; Plewka, Maciej <[email protected]>; Andi Shyti <[email protected]>
Subject: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131

Wa_22013059131 sets FORCE_1_SUB_MESSAGE_PER_FRAGMENT in LSC_CHICKEN_BIT_0 at engine init, but this is known to cause GPU hangs in certain workloads.
Add I915_CONTEXT_PARAM_WA_22013059131 so userspace that handles the workaround itself (e.g. by limiting SLM size) can set it to 1 to let the kernel know bit 15 programming is not needed for that context.

LSC_CHICKEN_BIT_0 is not context-saved by hardware, so the kernel restores the correct value on every context switch via the indirect context batchbuffer to avoid leaking state between contexts. The old unconditional application of Wa22013059131 in intel_workarounds.c is removed.

v3:
- Kernel-internal context will not change workaround settings

Bspec: 54833

Fixes 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine workarounds")
Cc Shuicheng Lin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maciej Plewka <[email protected]>
Cc Andi Shyti <[email protected]>
---
 drivers/gpu/drm/i915/gem/i915_gem_context.c   | 12 +++++
 .../gpu/drm/i915/gem/i915_gem_context_types.h |  1 +  drivers/gpu/drm/i915/gt/intel_context_types.h |  1 +
 drivers/gpu/drm/i915/gt/intel_lrc.c           | 44 ++++++++++++++++++-
 drivers/gpu/drm/i915/gt/intel_workarounds.c   | 10 ++---
 include/uapi/drm/i915_drm.h                   | 10 +++++
 6 files changed, 72 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_context.c +12 -0
index 6ac0f23570f3..d24e449f1eb3 100644
@@ -911,6 +911,15 @@ static int set_proto_ctx_param(struct drm_i915_file_private *fpriv,
 			ret = -EINVAL;
 		break;
 
+	case I915_CONTEXT_PARAM_WA_22013059131:
+		if (args->size)
+			ret = -EINVAL;
+		else if (args->value)
+			pc->user_flags |= BIT(UCONTEXT_WA_22013059131);
+		else
+			pc->user_flags &= ~BIT(UCONTEXT_WA_22013059131);
+		break;
+
 	case I915_CONTEXT_PARAM_RECOVERABLE:
 		if (args->size)
 			ret = -EINVAL;
@@ -1003,6 +1012,9 @@ static int intel_context_set_gem(struct intel_context *ce,
 	if (test_bit(UCONTEXT_LOW_LATENCY, &ctx->user_flags))
 		__set_bit(CONTEXT_LOW_LATENCY, &ce->flags);
 
+	if (test_bit(UCONTEXT_WA_22013059131, &ctx->user_flags))
+		__set_bit(CONTEXT_WA_22013059131, &ce->flags);
+
 	return ret;
 }
 
drivers/gpu/drm/i915/gem/i915_gem_context_types.h +1 -0
index 0267c924634b..4efc0e758d3b 100644
@@ -338,6 +338,7 @@ struct i915_gem_context {
 #define UCONTEXT_RECOVERABLE		3
 #define UCONTEXT_PERSISTENCE		4
 #define UCONTEXT_LOW_LATENCY		5
+#define UCONTEXT_WA_22013059131		6
 
 	/**
 	 * @flags: small set of booleans
drivers/gpu/drm/i915/gt/intel_context_types.h +1 -0
index 10070ee4d74c..84011ce7c84d 100644
@@ -133,6 +133,7 @@ struct intel_context {
 #define CONTEXT_EXITING			13
 #define CONTEXT_LOW_LATENCY		14
 #define CONTEXT_OWN_STATE		15
+#define CONTEXT_WA_22013059131		16
 
 	struct {
 		u64 timeout_us;
drivers/gpu/drm/i915/gt/intel_lrc.c +30 -0
index 147d22907960..bab4f38515d4 100644
@@ -1348,6 +1348,37 @@ gen12_invalidate_state_cache(u32 *cs)
 	return cs;
 }
 
+static u32 *
+dg2_g11_emit_wa_22013059131(const struct intel_context *ce, u32 *cs) {
+	/*
+	 * While re-writing LSC_CHICKEN_BIT_0 for Wa_22013059131, the
+	 * other bits of the register will also get overwritten.  The
+	 * hardware default for all other bits is 0, but any workarounds
+	 * that adjust the other bits in the lower dword of the register
+	 * also need to be re-applied here.  At the moment that's just
+	 * Wa_22014226127, which is always set for DG2-G11 platforms.
+	 */
+	u32 val = DISABLE_D8_D16_COASLESCE;
+
+	/*
+	 * Wa_22013059131: only set FORCE_1_SUB_MESSAGE_PER_FRAGMENT for
+	 * userspace contexts that have not opted out.  Kernel-internal
+	 * contexts (gem_context == NULL) never run shader workloads that
+	 * require this workaround, so skip them unconditionally.
+	 */
+	if (rcu_access_pointer(ce->gem_context) &&
+	    !test_bit(CONTEXT_WA_22013059131, &ce->flags)) {
+		val |= FORCE_1_SUB_MESSAGE_PER_FRAGMENT;
+	}
+
+	*cs++ = MI_LOAD_REGISTER_IMM(1);
+	*cs++ = i915_mmio_reg_offset(LSC_CHICKEN_BIT_0);
+	*cs++ = val;
+
+	return cs;
+}
+
 static u32 *
 gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)  { @@ -1371,6 +1402,11 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
 	    IS_DG2(ce->engine->i915))

cs = dg2_emit_draw_watermark_setting(cs);

+ /* Wa_22013059131:dg2 */
+ if (IS_DG2_G11(ce->engine->i915))
+ cs = dg2_g11_emit_wa_22013059131(ce, cs);
+
+
return cs;
}

@@ -1387,7 +1423,13 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);

- return gen12_emit_aux_table_inv(ce->engine, cs);
+ cs = gen12_emit_aux_table_inv(ce->engine, cs);
+
+ /* Wa_22013059131:dg2 */
+ if (IS_DG2_G11(ce->engine->i915))
+ cs = dg2_g11_emit_wa_22013059131(ce, cs);
+
+ return cs;
}

static u32 *xehp_emit_fastcolor_blt_wabb(const struct intel_context *ce, u32 *cs) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index 24ea5d8d529c..ef6eea3ab597 100644

drivers/gpu/drm/i915/gt/intel_workarounds.c +5 -5
@@ -2840,7 +2840,11 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 	if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
 	    IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0) ||
 	    IS_DG2(i915)) {
-		/* Wa_22014226127 */
+		/*
+		 * Wa_22014226127: Note that this workaround also needs to be
+		 * re-applied in intel_lrc.c when LSC_CHICKEN_BIT_0 is
+		 * re-written for Wa_22013059131.
+		 */
 		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0, DISABLE_D8_D16_COASLESCE);
 	}
 
@@ -2867,10 +2871,6 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
 				     MAXREQS_PER_BANK,
 				     REG_FIELD_PREP(MAXREQS_PER_BANK, 2));
 
-		/* Wa_22013059131:dg2 */
-		wa_mcr_write_or(wal, LSC_CHICKEN_BIT_0,
-				FORCE_1_SUB_MESSAGE_PER_FRAGMENT);
-
 		/*
 		 * Wa_22012654132
 		 *
include/uapi/drm/i915_drm.h +12 -0
@@ -2172,6 +2172,16 @@ struct drm_i915_gem_context_param {
  * Note that this is a debug API not available on production kernel builds.
  */
 #define I915_CONTEXT_PARAM_CONTEXT_IMAGE	0xf
+
+/*
+ * I915_CONTEXT_PARAM_WA_22013059131:
+ *
+ * Default value 0 means the kernel programs Wa_22013059131 for this context.
+ * Set to 1 to inform the kernel that userspace is taking 
+responsibility for
+ * applying the preferred workaround implementation, so the kernel 
+programming
+ * of LSC_CHICKEN_BIT_0 bit 15 is not needed for this context. DG2-G11 only.
+ */
+#define I915_CONTEXT_PARAM_WA_22013059131	0x10
 /* Must be kept compact -- no holes and well documented */

/** @value: Context parameter value to be set or queried */
--
2.43.0

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.

#2 lore raw

This fix looks good from compute UMD perspective.

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN. Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.

#3 lore raw

✗ i915.CI.BAT: failure for drm/i915/dg2: Add per-context control for Wa_22013059131 (rev3)

In reply to Jia Yao
== Series Details ==

== Series Details ==

Series: drm/i915/dg2: Add per-context control for Wa_22013059131 (rev3)
URL : https://patchwork.freedesktop.org/series/164198/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_18348 -> Patchwork_164198v3
====================================================

Summary
-------

**FAILURE**

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

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

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

Missing (2): bat-dg2-13 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@kms_busy@basic@modeset:
- bat-adlp-9: [PASS][1] -> [FAIL][2] +1 other test fail
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-adlp-9/igt@kms_busy@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-adlp-9/igt@kms_busy@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-dg2-8: [PASS][3] -> [DMESG-FAIL][4] ([i915#12061]) +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-dg2-8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-dg2-8/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-dg2-9: [PASS][5] -> [DMESG-FAIL][6] ([i915#12061]) +1 other test dmesg-fail
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-dg2-9/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-dg2-9/igt@i915_selftest@[email protected]
- bat-mtlp-9: [PASS][7] -> [DMESG-FAIL][8] ([i915#12061]) +1 other test dmesg-fail
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-mtlp-9/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-mtlp-9/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@gem_exec_fence@basic-await@bcs0:
- bat-dg2-9: [FAIL][9] ([i915#15263]) -> [PASS][10] +1 other test pass
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-dg2-9/igt@gem_exec_fence@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-dg2-9/igt@gem_exec_fence@[email protected]

* igt@i915_selftest@live@sanitycheck:
- fi-kbl-7567u: [DMESG-WARN][11] ([i915#13735]) -> [PASS][12] +79 other tests pass
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/fi-kbl-7567u/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/fi-kbl-7567u/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arlh-3: [DMESG-FAIL][13] ([i915#12061]) -> [PASS][14] +1 other test pass
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-arlh-3/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-arlh-3/igt@i915_selftest@[email protected]
- bat-arls-5: [DMESG-FAIL][15] ([i915#12061]) -> [PASS][16] +1 other test pass
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/bat-arls-5/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/bat-arls-5/igt@i915_selftest@[email protected]

* igt@kms_busy@basic@flip:
- fi-kbl-7567u: [DMESG-WARN][17] ([i915#13735] / [i915#180]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/fi-kbl-7567u/igt@kms_busy@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/fi-kbl-7567u/igt@kms_busy@[email protected]

* igt@kms_pm_rpm@basic-pci-d3-state:
- fi-kbl-7567u: [DMESG-WARN][19] ([i915#13735] / [i915#15673] / [i915#180]) -> [PASS][20] +52 other tests pass
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18348/fi-kbl-7567u/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_164198v3/fi-kbl-7567u/igt@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735
[i915#15263]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15263
[i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673
[i915#180]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/180

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

* Linux: CI_DRM_18348 -> Patchwork_164198v3

CI-20190529: 20190529
CI_DRM_18348: 3b9ca4c40814c96c38986ae2ba6651e43757ca5f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8863: 5b279a8b71dc1672099205a1a9e8135c7c7fadb5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_164198v3: 3b9ca4c40814c96c38986ae2ba6651e43757ca5f @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

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

#4 lore raw
In reply to Jia Yao

Hi,

Quoted 6 lines · Jia Yao

Wa_22013059131 sets FORCE_1_SUB_MESSAGE_PER_FRAGMENT in LSC_CHICKEN_BIT_0 at engine init, but this is known to cause GPU hangs in certain workloads. Add I915_CONTEXT_PARAM_WA_22013059131 so userspace that handles the workaround itself (e.g. by limiting SLM size) can set it to 1 to let the kernel know bit 15 programming is not needed for that context.

Quoted 7 lines

LSC_CHICKEN_BIT_0 is not context-saved by hardware, so the kernel restores the correct value on every context switch via the indirect context batchbuffer to avoid leaking state between contexts. The old unconditional application of Wa22013059131 in intel_workarounds.c is removed.

v3:
- Kernel-internal context will not change workaround settings

Do we have a link of the userspace using this API?

Joonas, do we need also a documentation update here?

Thanks,
Andi

Quoted 11 lines

Bspec: 54833

Fixes 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine workarounds")
Cc Shuicheng Lin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maciej Plewka <[email protected]>
Cc Andi Shyti <[email protected]>
author
#5 lore raw

Hi Andi,

You mean we need add NEO public link https://github.com/intel/compute-runtime/pull/919 here?

Thanks,
Jia

Quoted 52 lines

-----Original Message-----
From: Andi Shyti <[email protected]>
Sent: Tuesday, April 28, 2026 8:18 AM
To: Yao, Jia <[email protected]>
Cc: [email protected]; [email protected]; Lin, Shuicheng <[email protected]>; Roper, Matthew D <[email protected]>; Joonas Lahtinen <[email protected]>; Vivi, Rodrigo <[email protected]>; Plewka, Maciej <[email protected]>; Andi Shyti <[email protected]>
Subject: Re: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131

Hi,

Quoted 2 lines · Jia Yao

Wa_22013059131 sets FORCE_1_SUB_MESSAGE_PER_FRAGMENT in LSC_CHICKEN_BIT_0 at engine init, but this is known to cause GPU hangs in

certain workloads.

Quoted 1 line

Add I915_CONTEXT_PARAM_WA_22013059131 so userspace that handles

the

Quoted 7 lines

workaround itself (e.g. by limiting SLM size) can set it to 1 to let the kernel know bit 15 programming is not needed for that context.

LSC_CHICKEN_BIT_0 is not context-saved by hardware, so the kernel restores the correct value on every context switch via the indirect context batchbuffer to avoid leaking state between contexts. The old unconditional application of Wa22013059131 in intel_workarounds.c is

removed.

Quoted 3 lines

v3:
- Kernel-internal context will not change workaround settings

Do we have a link of the userspace using this API?

Joonas, do we need also a documentation update here?

Thanks,
Andi

Quoted 12 lines

Bspec: 54833

Fixes 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine

workarounds")

Cc Shuicheng Lin <[email protected]>
Cc Matt Roper <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Maciej Plewka <[email protected]>
Cc Andi Shyti <[email protected]>