* [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131
@ 2026-04-17 5:09 Jia Yao
2026-04-17 5:39 ` Plewka, Maciej
2026-04-28 15:18 ` Andi Shyti
0 siblings, 2 replies; 5+ messages in thread
From: Jia Yao @ 2026-04-17 5:09 UTC (permalink / raw)
To: intel-gfx
Cc: Jia Yao, stable, Shuicheng Lin, Matt Roper, Joonas Lahtinen,
Rodrigo Vivi, Maciej Plewka, Andi Shyti
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: stable@vger.kernel.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Maciej Plewka <maciej.plewka@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Jia Yao <jia.yao@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 6ac0f23570f3..d24e449f1eb3 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -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;
}
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
index 0267c924634b..4efc0e758d3b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
@@ -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
diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h
index 10070ee4d74c..84011ce7c84d 100644
--- a/drivers/gpu/drm/i915/gt/intel_context_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_context_types.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 147d22907960..bab4f38515d4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -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
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -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
*
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 535cb68fdb5c..0f553bb12fb0 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131
2026-04-17 5:09 [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131 Jia Yao
@ 2026-04-17 5:39 ` Plewka, Maciej
2026-04-17 5:54 ` Plewka, Maciej
2026-04-28 15:18 ` Andi Shyti
1 sibling, 1 reply; 5+ messages in thread
From: Plewka, Maciej @ 2026-04-17 5:39 UTC (permalink / raw)
To: Yao, Jia, intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org, Lin, Shuicheng, Roper, Matthew D,
Joonas Lahtinen, Vivi, Rodrigo, Andi Shyti
This fix looks good from compute UMD perspective.
-----Original Message-----
From: Yao, Jia <jia.yao@intel.com>
Sent: Friday, April 17, 2026 7:10 AM
To: intel-gfx@lists.freedesktop.org
Cc: Yao, Jia <jia.yao@intel.com>; stable@vger.kernel.org; Lin, Shuicheng <shuicheng.lin@intel.com>; Roper, Matthew D <matthew.d.roper@intel.com>; Joonas Lahtinen <joonas.lahtinen@linux.intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>; Plewka, Maciej <maciej.plewka@intel.com>; Andi Shyti <andi.shyti@linux.intel.com>
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: stable@vger.kernel.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Maciej Plewka <maciej.plewka@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Jia Yao <jia.yao@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
---
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(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 6ac0f23570f3..d24e449f1eb3 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -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;
}
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
index 0267c924634b..4efc0e758d3b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context_types.h
@@ -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
diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h
index 10070ee4d74c..84011ce7c84d 100644
--- a/drivers/gpu/drm/i915/gt/intel_context_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_context_types.h
@@ -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;
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 147d22907960..bab4f38515d4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -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
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -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
*
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index 535cb68fdb5c..0f553bb12fb0 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -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.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131
2026-04-17 5:39 ` Plewka, Maciej
@ 2026-04-17 5:54 ` Plewka, Maciej
0 siblings, 0 replies; 5+ messages in thread
From: Plewka, Maciej @ 2026-04-17 5:54 UTC (permalink / raw)
To: Yao, Jia, intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org, Lin, Shuicheng, Roper, Matthew D,
Joonas Lahtinen, Vivi, Rodrigo, Andi Shyti
This fix looks good from compute UMD perspective.
Acked-by: Maciej Plewka <maciej.plewka@intel.com>
---------------------------------------------------------------------
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131
2026-04-17 5:09 [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131 Jia Yao
2026-04-17 5:39 ` Plewka, Maciej
@ 2026-04-28 15:18 ` Andi Shyti
2026-04-28 17:41 ` Yao, Jia
1 sibling, 1 reply; 5+ messages in thread
From: Andi Shyti @ 2026-04-28 15:18 UTC (permalink / raw)
To: Jia Yao
Cc: intel-gfx, stable, Shuicheng Lin, Matt Roper, Joonas Lahtinen,
Rodrigo Vivi, Maciej Plewka, Andi Shyti
Hi,
On Fri, Apr 17, 2026 at 05:09:56AM +0000, Jia Yao wrote:
> 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
Do we have a link of the userspace using this API?
Joonas, do we need also a documentation update here?
Thanks,
Andi
> Bspec: 54833
> Fixes: 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine workarounds")
> Cc: stable@vger.kernel.org
> Cc: Shuicheng Lin <shuicheng.lin@intel.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Maciej Plewka <maciej.plewka@intel.com>
> Cc: Andi Shyti <andi.shyti@linux.intel.com>
> Signed-off-by: Jia Yao <jia.yao@intel.com>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131
2026-04-28 15:18 ` Andi Shyti
@ 2026-04-28 17:41 ` Yao, Jia
0 siblings, 0 replies; 5+ messages in thread
From: Yao, Jia @ 2026-04-28 17:41 UTC (permalink / raw)
To: Andi Shyti
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org,
Lin, Shuicheng, Roper, Matthew D, Joonas Lahtinen, Vivi, Rodrigo,
Plewka, Maciej
Hi Andi,
You mean we need add NEO public link https://github.com/intel/compute-runtime/pull/919 here?
Thanks,
Jia
> -----Original Message-----
> From: Andi Shyti <andi.shyti@linux.intel.com>
> Sent: Tuesday, April 28, 2026 8:18 AM
> To: Yao, Jia <jia.yao@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; stable@vger.kernel.org; Lin, Shuicheng
> <shuicheng.lin@intel.com>; Roper, Matthew D
> <matthew.d.roper@intel.com>; Joonas Lahtinen
> <joonas.lahtinen@linux.intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>;
> Plewka, Maciej <maciej.plewka@intel.com>; Andi Shyti
> <andi.shyti@linux.intel.com>
> Subject: Re: [PATCH v3] drm/i915/dg2: Add per-context control for
> Wa_22013059131
>
> Hi,
>
> On Fri, Apr 17, 2026 at 05:09:56AM +0000, Jia Yao wrote:
> > 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
>
> Do we have a link of the userspace using this API?
>
> Joonas, do we need also a documentation update here?
>
> Thanks,
> Andi
>
> > Bspec: 54833
> > Fixes: 645cc0b9d972 ("drm/i915/dg2: Add initial gt/ctx/engine
> > workarounds")
> > Cc: stable@vger.kernel.org
> > Cc: Shuicheng Lin <shuicheng.lin@intel.com>
> > Cc: Matt Roper <matthew.d.roper@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Maciej Plewka <maciej.plewka@intel.com>
> > Cc: Andi Shyti <andi.shyti@linux.intel.com>
> > Signed-off-by: Jia Yao <jia.yao@intel.com>
> > Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-28 17:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 5:09 [PATCH v3] drm/i915/dg2: Add per-context control for Wa_22013059131 Jia Yao
2026-04-17 5:39 ` Plewka, Maciej
2026-04-17 5:54 ` Plewka, Maciej
2026-04-28 15:18 ` Andi Shyti
2026-04-28 17:41 ` Yao, Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox