All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-04 22:14 ` fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-03-04 22:14 UTC (permalink / raw)
  To: intel-gfx, dri-devel
  Cc: stuart.summers, akeem.g.abodunrin, Fei Yang, chris.p.wilson

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the
engine executing the request. And the mmio address for the aux_inv
register is set after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++-----------
 .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 5 files changed, 82 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
index 1c82caf525c3..0ec4986e4805 100644
--- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
@@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen2 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq, u32 mode)
 	*cs++ = MI_NOOP;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
index 5e65550b4dfb..efe51c4662fe 100644
--- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
@@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq, u32 flags)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index b1b9c3fd7bf9..b6374cf53314 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. aux_inv has been done above, no fixup needed */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		/*
+		 * We don't know which engine will eventually carry out
+		 * this request, so the mmio aux_inv register address is
+		 * unknown at this moment. We save the cs pointer supposed
+		 * to hold the aux_inv address in rq->aux_inv_fixup and set
+		 * it in execlists_dequeue() when the engine instance
+		 * carrying out this request becomes certain
+		 */
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv */
+		*cs++ = 0; /* mmio addr to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
-	}
+	} else
+		rq->aux_inv_fixup = NULL;
 
 	if (mode & EMIT_INVALIDATE)
 		*cs++ = preparser_disable(false);
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index e1470bb60f34..7e8552414275 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if (rq->aux_inv_fixup) {
+					*rq->aux_inv_fixup =
+						i915_mmio_reg_offset
+							(aux_inv_reg(engine));
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..8e0764c43936 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -312,6 +312,8 @@ struct i915_request {
 	struct i915_capture_list *capture_list;
 #endif
 
+	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
+
 	/** Time at which this request was emitted, in jiffies. */
 	unsigned long emitted_jiffies;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-04 22:14 ` fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-03-04 22:14 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: chris.p.wilson

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the
engine executing the request. And the mmio address for the aux_inv
register is set after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++-----------
 .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 5 files changed, 82 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
index 1c82caf525c3..0ec4986e4805 100644
--- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
@@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen2 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq, u32 mode)
 	*cs++ = MI_NOOP;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
index 5e65550b4dfb..efe51c4662fe 100644
--- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
@@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq, u32 flags)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index b1b9c3fd7bf9..b6374cf53314 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. aux_inv has been done above, no fixup needed */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		/*
+		 * We don't know which engine will eventually carry out
+		 * this request, so the mmio aux_inv register address is
+		 * unknown at this moment. We save the cs pointer supposed
+		 * to hold the aux_inv address in rq->aux_inv_fixup and set
+		 * it in execlists_dequeue() when the engine instance
+		 * carrying out this request becomes certain
+		 */
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv */
+		*cs++ = 0; /* mmio addr to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
-	}
+	} else
+		rq->aux_inv_fixup = NULL;
 
 	if (mode & EMIT_INVALIDATE)
 		*cs++ = preparser_disable(false);
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index e1470bb60f34..7e8552414275 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if (rq->aux_inv_fixup) {
+					*rq->aux_inv_fixup =
+						i915_mmio_reg_offset
+							(aux_inv_reg(engine));
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..8e0764c43936 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -312,6 +312,8 @@ struct i915_request {
 	struct i915_capture_list *capture_list;
 #endif
 
+	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
+
 	/** Time at which this request was emitted, in jiffies. */
 	unsigned long emitted_jiffies;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
  (?)
@ 2022-03-04 22:39 ` Patchwork
  -1 siblings, 0 replies; 35+ messages in thread
From: Patchwork @ 2022-03-04 22:39 UTC (permalink / raw)
  To: fei.yang; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: avoid concurrent writes to aux_inv (rev5)
URL   : https://patchwork.freedesktop.org/series/100772/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
eb286fbe8a6e drm/i915: avoid concurrent writes to aux_inv
-:198: CHECK:BRACES: Unbalanced braces around else statement
#198: FILE: drivers/gpu/drm/i915/gt/gen8_engine_cs.c:323:
+	} else

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



^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
  (?)
  (?)
@ 2022-03-04 22:40 ` Patchwork
  -1 siblings, 0 replies; 35+ messages in thread
From: Patchwork @ 2022-03-04 22:40 UTC (permalink / raw)
  To: fei.yang; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: avoid concurrent writes to aux_inv (rev5)
URL   : https://patchwork.freedesktop.org/series/100772/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.



^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
                   ` (2 preceding siblings ...)
  (?)
@ 2022-03-04 23:12 ` Patchwork
  -1 siblings, 0 replies; 35+ messages in thread
From: Patchwork @ 2022-03-04 23:12 UTC (permalink / raw)
  To: fei.yang; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

== Series Details ==

Series: drm/i915: avoid concurrent writes to aux_inv (rev5)
URL   : https://patchwork.freedesktop.org/series/100772/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11330 -> Patchwork_22492
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (46 -> 41)
------------------------------

  Additional (1): fi-glk-dsi 
  Missing    (6): fi-kbl-soraka shard-tglu fi-bsw-cyan fi-icl-u2 fi-pnv-d510 fi-bdw-samus 


Changes
-------

  No changes found


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

  * IGT: IGT_6364 -> None
  * Linux: CI_DRM_11330 -> Patchwork_22492

  CI-20190529: 20190529
  CI_DRM_11330: 68d8cd94c6eaa94aa6bae2e92efbd488523a1a1b @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6364: 3523fe577bc22e6512a8de7e60175c8f46cf61d2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22492: eb286fbe8a6ed532c821b6da358f0b1fa8af7291 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

eb286fbe8a6e drm/i915: avoid concurrent writes to aux_inv

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 1858 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
                   ` (3 preceding siblings ...)
  (?)
@ 2022-03-05  9:36 ` Patchwork
  2022-03-16  3:22   ` Summers, Stuart
  -1 siblings, 1 reply; 35+ messages in thread
From: Patchwork @ 2022-03-05  9:36 UTC (permalink / raw)
  To: fei.yang; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30275 bytes --]

== Series Details ==

Series: drm/i915: avoid concurrent writes to aux_inv (rev5)
URL   : https://patchwork.freedesktop.org/series/100772/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11330_full -> Patchwork_22492_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_22492_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22492_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_balancer@fairslice:
    - shard-tglb:         [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb8/igt@gem_exec_balancer@fairslice.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb3/igt@gem_exec_balancer@fairslice.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt:
    - shard-tglb:         [PASS][3] -> [INCOMPLETE][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html

  
#### Suppressed ####

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

  * igt@api_intel_allocator@fork-simple-stress-signal:
    - {shard-dg1}:        [PASS][5] -> [TIMEOUT][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-dg1-13/igt@api_intel_allocator@fork-simple-stress-signal.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-16/igt@api_intel_allocator@fork-simple-stress-signal.html

  * igt@drm_import_export@import-close-race-prime:
    - {shard-rkl}:        [PASS][7] -> [INCOMPLETE][8] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-1/igt@drm_import_export@import-close-race-prime.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-5/igt@drm_import_export@import-close-race-prime.html

  * {igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale}:
    - {shard-rkl}:        NOTRUN -> [SKIP][9] +2 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale.html

  * igt@prime_mmap_coherency@ioctl-errors:
    - {shard-dg1}:        NOTRUN -> [SKIP][10]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-12/igt@prime_mmap_coherency@ioctl-errors.html

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

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

### CI changes ###

#### Possible fixes ####

  * boot:
    - shard-glk:          ([PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], [PASS][29], [FAIL][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35]) ([i915#4392]) -> ([PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [PASS][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], [PASS][52], [PASS][53], [PASS][54], [PASS][55], [PASS][56], [PASS][57], [PASS][58], [PASS][59], [PASS][60])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html

  

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_sseu@invalid-sseu:
    - shard-tglb:         NOTRUN -> [SKIP][61] ([i915#280])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_ctx_sseu@invalid-sseu.html

  * igt@gem_eio@kms:
    - shard-tglb:         [PASS][62] -> [FAIL][63] ([i915#232])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb6/igt@gem_eio@kms.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb1/igt@gem_eio@kms.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          [PASS][64] -> [FAIL][65] ([i915#2842])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl1/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html
    - shard-tglb:         NOTRUN -> [FAIL][66] ([i915#2842])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-apl:          [PASS][67] -> [FAIL][68] ([i915#2842]) +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl6/igt@gem_exec_fair@basic-none@vecs0.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-glk:          [PASS][69] -> [FAIL][70] ([i915#2842])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_exec_fair@basic-pace@rcs0.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_lmem_swapping@parallel-random:
    - shard-apl:          NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#4613])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl6/igt@gem_lmem_swapping@parallel-random.html

  * igt@gem_lmem_swapping@smem-oom:
    - shard-skl:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#4613]) +2 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@gem_lmem_swapping@smem-oom.html

  * igt@gem_pxp@reject-modify-context-protection-off-2:
    - shard-tglb:         NOTRUN -> [SKIP][73] ([i915#4270])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_pxp@reject-modify-context-protection-off-2.html

  * igt@gem_userptr_blits@input-checking:
    - shard-glk:          NOTRUN -> [DMESG-WARN][74] ([i915#4991])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@gem_userptr_blits@input-checking.html

  * igt@gen7_exec_parse@chained-batch:
    - shard-tglb:         NOTRUN -> [SKIP][75] ([fdo#109289])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gen7_exec_parse@chained-batch.html

  * igt@gen9_exec_parse@basic-rejected-ctx-param:
    - shard-iclb:         NOTRUN -> [SKIP][76] ([i915#2856])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@gen9_exec_parse@basic-rejected-ctx-param.html

  * igt@gen9_exec_parse@batch-invalid-length:
    - shard-tglb:         NOTRUN -> [SKIP][77] ([i915#2527] / [i915#2856])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gen9_exec_parse@batch-invalid-length.html

  * igt@i915_pm_sseu@full-enable:
    - shard-tglb:         NOTRUN -> [SKIP][78] ([i915#4387])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@i915_pm_sseu@full-enable.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [PASS][79] -> [INCOMPLETE][80] ([i915#3921])
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-snb7/igt@i915_selftest@live@hangcheck.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-snb7/igt@i915_selftest@live@hangcheck.html

  * igt@kms_big_fb@linear-32bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([fdo#111614])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@linear-32bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][82] ([i915#3743])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
    - shard-skl:          NOTRUN -> [SKIP][83] ([fdo#109271] / [i915#3777]) +1 similar issue
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
    - shard-apl:          NOTRUN -> [SKIP][84] ([fdo#109271] / [i915#3777])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
    - shard-tglb:         NOTRUN -> [SKIP][85] ([fdo#111615]) +1 similar issue
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-glk:          NOTRUN -> [SKIP][86] ([fdo#109271] / [i915#3886])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][87] ([fdo#111615] / [i915#3689])
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs.html

  * igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][88] ([i915#3689] / [i915#3886]) +2 similar issues
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][89] ([fdo#109271] / [i915#3886]) +2 similar issues
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][90] ([fdo#109271] / [i915#3886]) +7 similar issues
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][91] ([i915#3689]) +1 similar issue
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs.html

  * igt@kms_chamelium@hdmi-audio-edid:
    - shard-tglb:         NOTRUN -> [SKIP][92] ([fdo#109284] / [fdo#111827]) +2 similar issues
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_chamelium@hdmi-audio-edid.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-skl:          NOTRUN -> [SKIP][93] ([fdo#109271] / [fdo#111827]) +17 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color_chamelium@pipe-c-ctm-max:
    - shard-apl:          NOTRUN -> [SKIP][94] ([fdo#109271] / [fdo#111827]) +4 similar issues
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_color_chamelium@pipe-c-ctm-max.html

  * igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][95] ([fdo#109278] / [fdo#109279])
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding.html

  * igt@kms_cursor_crc@pipe-b-cursor-32x10-random:
    - shard-tglb:         NOTRUN -> [SKIP][96] ([i915#3359])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_cursor_crc@pipe-b-cursor-32x10-random.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][97] ([fdo#109279] / [i915#3359]) +1 similar issue
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement:
    - shard-iclb:         NOTRUN -> [SKIP][98] ([fdo#109278]) +4 similar issues
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size:
    - shard-iclb:         NOTRUN -> [SKIP][99] ([fdo#109274] / [fdo#109278])
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size.html

  * igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
    - shard-iclb:         [PASS][100] -> [FAIL][101] ([i915#2346])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb4/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html

  * igt@kms_flip@2x-flip-vs-panning-interruptible:
    - shard-tglb:         NOTRUN -> [SKIP][102] ([fdo#109274] / [fdo#111825]) +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip@2x-flip-vs-panning-interruptible.html

  * igt@kms_flip@2x-plain-flip-fb-recreate:
    - shard-iclb:         NOTRUN -> [SKIP][103] ([fdo#109274])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_flip@2x-plain-flip-fb-recreate.html

  * igt@kms_flip@flip-vs-expired-vblank@b-dp1:
    - shard-kbl:          [PASS][104] -> [FAIL][105] ([i915#79])
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-apl:          [PASS][106] -> [DMESG-WARN][107] ([i915#180]) +3 similar issues
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling:
    - shard-tglb:         NOTRUN -> [SKIP][108] ([i915#2587])
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc:
    - shard-tglb:         NOTRUN -> [SKIP][109] ([fdo#109280] / [fdo#111825]) +15 similar issues
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen:
    - shard-iclb:         NOTRUN -> [SKIP][110] ([fdo#109280]) +2 similar issues
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
    - shard-apl:          NOTRUN -> [SKIP][111] ([fdo#109271]) +82 similar issues
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render:
    - shard-glk:          NOTRUN -> [SKIP][112] ([fdo#109271]) +15 similar issues
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-skl:          NOTRUN -> [FAIL][113] ([i915#1188])
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:
    - shard-skl:          NOTRUN -> [SKIP][114] ([fdo#109271] / [i915#533]) +1 similar issue
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-d.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:
    - shard-apl:          NOTRUN -> [SKIP][115] ([fdo#109271] / [i915#533])
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence.html

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
    - shard-skl:          NOTRUN -> [FAIL][116] ([fdo#108145] / [i915#265]) +2 similar issues
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-skl:          NOTRUN -> [FAIL][117] ([i915#265])
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
    - shard-skl:          [PASS][118] -> [FAIL][119] ([fdo#108145] / [i915#265])
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
    - shard-skl:          NOTRUN -> [SKIP][120] ([fdo#109271] / [i915#658]) +2 similar issues
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_psr2_sf@cursor-plane-update-sf.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
    - shard-apl:          NOTRUN -> [SKIP][121] ([fdo#109271] / [i915#658])
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][122] -> [SKIP][123] ([fdo#109441])
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html

  * igt@kms_psr@psr2_suspend:
    - shard-tglb:         NOTRUN -> [FAIL][124] ([i915#132] / [i915#3467]) +1 similar issue
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_psr@psr2_suspend.html

  * igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:
    - shard-skl:          NOTRUN -> [SKIP][125] ([fdo#109271]) +187 similar issues
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html

  * igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c:
    - shard-iclb:         NOTRUN -> [SKIP][126] ([i915#5030]) +2 similar issues
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c.html

  * igt@kms_setmode@basic:
    - shard-glk:          [PASS][127] -> [FAIL][128] ([i915#31])
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/igt@kms_setmode@basic.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/igt@kms_setmode@basic.html

  * igt@kms_sysfs_edid_timing:
    - shard-skl:          NOTRUN -> [FAIL][129] ([IGT#2])
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_sysfs_edid_timing.html

  * igt@kms_writeback@writeback-pixel-formats:
    - shard-skl:          NOTRUN -> [SKIP][130] ([fdo#109271] / [i915#2437])
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_writeback@writeback-pixel-formats.html
    - shard-iclb:         NOTRUN -> [SKIP][131] ([i915#2437])
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_writeback@writeback-pixel-formats.html
    - shard-apl:          NOTRUN -> [SKIP][132] ([fdo#109271] / [i915#2437])
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_writeback@writeback-pixel-formats.html

  * igt@perf_pmu@rc6-suspend:
    - shard-kbl:          [PASS][133] -> [DMESG-WARN][134] ([i915#180])
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@perf_pmu@rc6-suspend.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@perf_pmu@rc6-suspend.html

  * igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name:
    - shard-tglb:         NOTRUN -> [SKIP][135] ([fdo#109291]) +1 similar issue
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name.html

  * igt@prime_nv_pcopy@test3_5:
    - shard-iclb:         NOTRUN -> [SKIP][136] ([fdo#109291])
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@prime_nv_pcopy@test3_5.html

  * igt@sysfs_clients@pidname:
    - shard-apl:          NOTRUN -> [SKIP][137] ([fdo#109271] / [i915#2994])
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@sysfs_clients@pidname.html
    - shard-skl:          NOTRUN -> [SKIP][138] ([fdo#109271] / [i915#2994])
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@sysfs_clients@pidname.html

  * igt@sysfs_clients@sema-25:
    - shard-tglb:         NOTRUN -> [SKIP][139] ([i915#2994])
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@sysfs_clients@sema-25.html

  * igt@sysfs_heartbeat_interval@mixed@rcs0:
    - shard-skl:          NOTRUN -> [DMESG-WARN][140] ([i915#1982])
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@sysfs_heartbeat_interval@mixed@rcs0.html

  
#### Possible fixes ####

  * igt@fbdev@unaligned-read:
    - {shard-rkl}:        [SKIP][141] ([i915#2582]) -> [PASS][142]
   [141]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@fbdev@unaligned-read.html
   [142]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@fbdev@unaligned-read.html

  * igt@gem_ctx_persistence@engines-hostile@vcs0:
    - shard-apl:          [FAIL][143] ([i915#2410]) -> [PASS][144]
   [143]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html
   [144]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html

  * igt@gem_ctx_persistence@smoketest:
    - shard-glk:          [FAIL][145] -> [PASS][146]
   [145]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_ctx_persistence@smoketest.html
   [146]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/igt@gem_ctx_persistence@smoketest.html

  * igt@gem_exec_endless@dispatch@vcs1:
    - {shard-tglu}:       [INCOMPLETE][147] ([i915#3778]) -> [PASS][148]
   [147]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-1/igt@gem_exec_endless@dispatch@vcs1.html
   [148]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-6/igt@gem_exec_endless@dispatch@vcs1.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-glk:          [FAIL][149] ([i915#2842]) -> [PASS][150] +1 similar issue
   [149]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [150]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [FAIL][151] ([i915#2842]) -> [PASS][152]
   [151]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [152]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs1:
    - shard-kbl:          [FAIL][153] ([i915#2842]) -> [PASS][154]
   [153]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@gem_exec_fair@basic-none@vcs1.html
   [154]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl1/igt@gem_exec_fair@basic-none@vcs1.html

  * igt@gem_exec_schedule@smoketest-all:
    - {shard-rkl}:        [INCOMPLETE][155] -> [PASS][156]
   [155]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@gem_exec_schedule@smoketest-all.html
   [156]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-1/igt@gem_exec_schedule@smoketest-all.html

  * igt@i915_pm_dc@dc9-dpms:
    - {shard-tglu}:       [SKIP][157] ([i915#4281]) -> [PASS][158]
   [157]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-3/igt@i915_pm_dc@dc9-dpms.html
   [158]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-2/igt@i915_pm_dc@dc9-dpms.html

  * igt@kms_big_fb@linear-64bpp-rotate-0:
    - {shard-rkl}:        ([SKIP][159], [PASS][160]) ([i915#1845]) -> [PASS][161]
   [159]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-4/igt@kms_big_fb@linear-64bpp-rotate-0.html
   [160]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-6/igt@kms_big_fb@linear-64bpp-rotate-0.h

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 33646 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx]  ✗ Fi.CI.IGT: failure for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-05  9:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2022-03-16  3:22   ` Summers, Stuart
  2022-03-16  5:58     ` Yang, Fei
  0 siblings, 1 reply; 35+ messages in thread
From: Summers, Stuart @ 2022-03-16  3:22 UTC (permalink / raw)
  To: intel-gfx, Yang, Fei

[-- Attachment #1: Type: text/plain, Size: 27870 bytes --]

On Sat, 2022-03-05 at 09:36 +0000, Patchwork wrote:
Patch Details
Series: drm/i915: avoid concurrent writes to aux_inv (rev5)
URL:    https://patchwork.freedesktop.org/series/100772/
State:  failure
Details:        https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/index.html
CI Bug Log - changes from CI_DRM_11330_full -> Patchwork_22492_full
Summary

FAILURE

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

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

Participating hosts (13 -> 13)

No changes in participating hosts

Possible new issues

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

IGT changes
Possible regressions

  *   igt@gem_exec_balancer@fairslice:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb8/igt@gem_exec_balancer@fairslice.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb3/igt@gem_exec_balancer@fairslice.html>

I don't think the one below is related, but can you check on the above failure to make sure that isn't a result of your patch?

Thanks,
Stuart


  *
  *   igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html>

Suppressed

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

  *   igt@api_intel_allocator@fork-simple-stress-signal:

     *   {shard-dg1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-dg1-13/igt@api_intel_allocator@fork-simple-stress-signal.html> -> TIMEOUT<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-16/igt@api_intel_allocator@fork-simple-stress-signal.html>
  *   igt@drm_import_export@import-close-race-prime:

     *   {shard-rkl}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-1/igt@drm_import_export@import-close-race-prime.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-5/igt@drm_import_export@import-close-race-prime.html> +1 similar issue
  *   {igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale}:

     *   {shard-rkl}: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale.html> +2 similar issues
  *   igt@prime_mmap_coherency@ioctl-errors:

     *   {shard-dg1}: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-12/igt@prime_mmap_coherency@ioctl-errors.html>

Known issues

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

CI changes
Possible fixes

  *   boot:
     *   shard-glk: (PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html>) ([i915#4392]) -> (PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html>)

IGT changes
Issues hit

  *   igt@gem_ctx_sseu@invalid-sseu:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_ctx_sseu@invalid-sseu.html> ([i915#280])
  *   igt@gem_eio@kms:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb6/igt@gem_eio@kms.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb1/igt@gem_eio@kms.html> ([i915#232])
  *   igt@gem_exec_fair@basic-none-solo@rcs0:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl1/igt@gem_exec_fair@basic-none-solo@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842])

     *   shard-tglb: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842])

  *   igt@gem_exec_fair@basic-none@vecs0:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl6/igt@gem_exec_fair@basic-none@vecs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html> ([i915#2842]) +1 similar issue
  *   igt@gem_exec_fair@basic-pace@rcs0:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_exec_fair@basic-pace@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/igt@gem_exec_fair@basic-pace@rcs0.html> ([i915#2842])
  *   igt@gem_lmem_swapping@parallel-random:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl6/igt@gem_lmem_swapping@parallel-random.html> ([fdo#109271] / [i915#4613])
  *   igt@gem_lmem_swapping@smem-oom:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@gem_lmem_swapping@smem-oom.html> ([fdo#109271] / [i915#4613]) +2 similar issues
  *   igt@gem_pxp@reject-modify-context-protection-off-2:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_pxp@reject-modify-context-protection-off-2.html> ([i915#4270])
  *   igt@gem_userptr_blits@input-checking:

     *   shard-glk: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@gem_userptr_blits@input-checking.html> ([i915#4991])
  *   igt@gen7_exec_parse@chained-batch:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gen7_exec_parse@chained-batch.html> ([fdo#109289])
  *   igt@gen9_exec_parse@basic-rejected-ctx-param:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@gen9_exec_parse@basic-rejected-ctx-param.html> ([i915#2856])
  *   igt@gen9_exec_parse@batch-invalid-length:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gen9_exec_parse@batch-invalid-length.html> ([i915#2527] / [i915#2856])
  *   igt@i915_pm_sseu@full-enable:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@i915_pm_sseu@full-enable.html> ([i915#4387])
  *   igt@i915_selftest@live@hangcheck:

     *   shard-snb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-snb7/igt@i915_selftest@live@hangcheck.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-snb7/igt@i915_selftest@live@hangcheck.html> ([i915#3921])
  *   igt@kms_big_fb@linear-32bpp-rotate-270:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@linear-32bpp-rotate-270.html> ([fdo#111614])
  *   igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html> ([i915#3743])
  *   igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html> ([fdo#109271] / [i915#3777]) +1 similar issue

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html> ([fdo#109271] / [i915#3777])

  *   igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html> ([fdo#111615]) +1 similar issue
  *   igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886])
  *   igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs.html> ([fdo#111615] / [i915#3689])
  *   igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html> ([i915#3689] / [i915#3886]) +2 similar issues
  *   igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886]) +2 similar issues
  *   igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886]) +7 similar issues
  *   igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs.html> ([i915#3689]) +1 similar issue
  *   igt@kms_chamelium@hdmi-audio-edid:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_chamelium@hdmi-audio-edid.html> ([fdo#109284] / [fdo#111827]) +2 similar issues
  *   igt@kms_chamelium@vga-hpd-for-each-pipe:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_chamelium@vga-hpd-for-each-pipe.html> ([fdo#109271] / [fdo#111827]) +17 similar issues
  *   igt@kms_color_chamelium@pipe-c-ctm-max:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_color_chamelium@pipe-c-ctm-max.html> ([fdo#109271] / [fdo#111827]) +4 similar issues
  *   igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding.html> ([fdo#109278] / [fdo#109279])
  *   igt@kms_cursor_crc@pipe-b-cursor-32x10-random:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_cursor_crc@pipe-b-cursor-32x10-random.html> ([i915#3359])
  *   igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement.html> ([fdo#109279] / [i915#3359]) +1 similar issue
  *   igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement.html> ([fdo#109278]) +4 similar issues
  *   igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size.html> ([fdo#109274] / [fdo#109278])
  *   igt@kms_cursor_legacy@flip-vs-cursor-varying-size:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb4/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html> ([i915#2346])
  *   igt@kms_flip@2x-flip-vs-panning-interruptible:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip@2x-flip-vs-panning-interruptible.html> ([fdo#109274] / [fdo#111825]) +1 similar issue
  *   igt@kms_flip@2x-plain-flip-fb-recreate:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_flip@2x-plain-flip-fb-recreate.html> ([fdo#109274])
  *   igt@kms_flip@flip-vs-expired-vblank@b-dp1:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html> ([i915#79])
  *   igt@kms_flip@flip-vs-suspend@a-dp1:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@kms_flip@flip-vs-suspend@a-dp1.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_flip@flip-vs-suspend@a-dp1.html> ([i915#180]) +3 similar issues
  *   igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html> ([i915#2587])
  *   igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc.html> ([fdo#109280] / [fdo#111825]) +15 similar issues
  *   igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html> ([fdo#109280]) +2 similar issues
  *   igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html> ([fdo#109271]) +82 similar issues
  *   igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render.html> ([fdo#109271]) +15 similar issues
  *   igt@kms_hdr@bpc-switch-suspend:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_hdr@bpc-switch-suspend.html> ([i915#1188])
  *   igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-d.html> ([fdo#109271] / [i915#533]) +1 similar issue
  *   igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence.html> ([fdo#109271] / [i915#533])
  *   igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max.html> ([fdo#108145] / [i915#265]) +2 similar issues
  *   igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html> ([i915#265])
  *   igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:

     *   shard-skl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html> ([fdo#108145] / [i915#265])
  *   igt@kms_psr2_sf@cursor-plane-update-sf:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_psr2_sf@cursor-plane-update-sf.html> ([fdo#109271] / [i915#658]) +2 similar issues
  *   igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area.html> ([fdo#109271] / [i915#658])
  *   igt@kms_psr@psr2_sprite_mmap_gtt:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html> -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html> ([fdo#109441])
  *   igt@kms_psr@psr2_suspend:

     *   shard-tglb: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_psr@psr2_suspend.html> ([i915#132] / [i915#3467]) +1 similar issue
  *   igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html> ([fdo#109271]) +187 similar issues
  *   igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c.html> ([i915#5030]) +2 similar issues
  *   igt@kms_setmode@basic:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/igt@kms_setmode@basic.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/igt@kms_setmode@basic.html> ([i915#31])
  *   igt@kms_sysfs_edid_timing:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_sysfs_edid_timing.html> ([IGT#2])
  *   igt@kms_writeback@writeback-pixel-formats:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_writeback@writeback-pixel-formats.html> ([fdo#109271] / [i915#2437])

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_writeback@writeback-pixel-formats.html> ([i915#2437])

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_writeback@writeback-pixel-formats.html> ([fdo#109271] / [i915#2437])

  *   igt@perf_pmu@rc6-suspend:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@perf_pmu@rc6-suspend.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@perf_pmu@rc6-suspend.html> ([i915#180])
  *   igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name.html> ([fdo#109291]) +1 similar issue
  *   igt@prime_nv_pcopy@test3_5:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@prime_nv_pcopy@test3_5.html> ([fdo#109291])
  *   igt@sysfs_clients@pidname:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@sysfs_clients@pidname.html> ([fdo#109271] / [i915#2994])

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@sysfs_clients@pidname.html> ([fdo#109271] / [i915#2994])

  *   igt@sysfs_clients@sema-25:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@sysfs_clients@sema-25.html> ([i915#2994])
  *   igt@sysfs_heartbeat_interval@mixed@rcs0:

     *   shard-skl: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@sysfs_heartbeat_interval@mixed@rcs0.html> ([i915#1982])

Possible fixes

  *   igt@fbdev@unaligned-read:

     *   {shard-rkl}: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@fbdev@unaligned-read.html> ([i915#2582]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@fbdev@unaligned-read.html>
  *   igt@gem_ctx_persistence@engines-hostile@vcs0:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html> ([i915#2410]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html>
  *   igt@gem_ctx_persistence@smoketest:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_ctx_persistence@smoketest.html> -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/igt@gem_ctx_persistence@smoketest.html>
  *   igt@gem_exec_endless@dispatch@vcs1:

     *   {shard-tglu}: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-1/igt@gem_exec_endless@dispatch@vcs1.html> ([i915#3778]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-6/igt@gem_exec_endless@dispatch@vcs1.html>
  *   igt@gem_exec_fair@basic-none-rrul@rcs0:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/igt@gem_exec_fair@basic-none-rrul@rcs0.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html> +1 similar issue
  *   igt@gem_exec_fair@basic-none-solo@rcs0:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html>
  *   igt@gem_exec_fair@basic-none@vcs1:

     *   shard-kbl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@gem_exec_fair@basic-none@vcs1.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl1/igt@gem_exec_fair@basic-none@vcs1.html>
  *   igt@gem_exec_schedule@smoketest-all:

     *   {shard-rkl}: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@gem_exec_schedule@smoketest-all.html> -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-1/igt@gem_exec_schedule@smoketest-all.html>
  *   igt@i915_pm_dc@dc9-dpms:

     *   {shard-tglu}: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-3/igt@i915_pm_dc@dc9-dpms.html> ([i915#4281]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-2/igt@i915_pm_dc@dc9-dpms.html>
  *   igt@kms_big_fb@linear-64bpp-rotate-0:

     *   {shard-rkl}: (SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-4/igt@kms_big_fb@linear-64bpp-rotate-0.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-6/igt@kms_big_fb@linear-64bpp-rotate-0.h>) ([i915#1845]) -> [PASS][161]

[-- Attachment #2: Type: text/html, Size: 33518 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
@ 2022-03-16  4:43   ` Summers, Stuart
  -1 siblings, 0 replies; 35+ messages in thread
From: Summers, Stuart @ 2022-03-16  4:43 UTC (permalink / raw)
  To: dri-devel, intel-gfx, Yang, Fei; +Cc: Abodunrin, Akeem G, Wilson, Chris P

On Fri, 2022-03-04 at 14:14 -0800, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With this patch, auxiliary table invalidation is done only for the
> engine executing the request. And the mmio address for the aux_inv
> register is set after the engine instance becomes certain.
> 
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
>  drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
>  drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++---------
> --
>  .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
>  drivers/gpu/drm/i915/i915_request.h           |  2 +
>  5 files changed, 82 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> index 1c82caf525c3..0ec4986e4805 100644
> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> @@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32
> mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen2 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = MI_NOOP;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> index 5e65550b4dfb..efe51c4662fe 100644
> --- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> @@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq,
> u32 flags)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index b1b9c3fd7bf9..b6374cf53314 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0; /* value */
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  		intel_ring_advance(rq, cs);
>  	}
>  
> +	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
> +	rq->aux_inv_fixup = NULL;

This is a little ugly to me. Can we just set this to 0 or 0xdeadbeef by
default maybe and check that value below instead of retroactively
adding all of these assignments?

> +
>  	return 0;
>  }
>  
> @@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
>  	return MI_ARB_CHECK | 1 << 8 | state;
>  }
>  
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
>  static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32
> *cs)
>  {
>  	*cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  		intel_ring_advance(rq, cs);
>  	}
>  
> +	/* hsdes: 1809175790. aux_inv has been done above, no fixup
> needed */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq,
> u32 mode)
>  	if (mode & EMIT_INVALIDATE)
>  		aux_inv = rq->engine->mask & ~BIT(BCS0);
>  	if (aux_inv)
> -		cmd += 2 * hweight32(aux_inv) + 2;
> +		cmd += 4;
>  
>  	cs = intel_ring_begin(rq, cmd);
>  	if (IS_ERR(cs))
> @@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request
> *rq, u32 mode)
>  	*cs++ = 0; /* value */
>  
>  	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv,
> tmp) {
> -			*cs++ =
> i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> +		/*
> +		 * We don't know which engine will eventually carry out
> +		 * this request, so the mmio aux_inv register address
> is
> +		 * unknown at this moment. We save the cs pointer
> supposed
> +		 * to hold the aux_inv address in rq->aux_inv_fixup and
> set
> +		 * it in execlists_dequeue() when the engine instance
> +		 * carrying out this request becomes certain
> +		 */
> +		*cs++ = MI_LOAD_REGISTER_IMM(1);
> +		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv
> */
> +		*cs++ = 0; /* mmio addr to be set at submission to HW
> */

Maybe MI_NOOP instead?

> +		*cs++ = AUX_INV;
>  		*cs++ = MI_NOOP;
> -	}
> +	} else

Can you add the brackets here on the else:
} else {
    aux_inv_fixup = NULL
}

Also good to run checkpatch. I see this showing up as a warning in the
checkpatch results.

> +		rq->aux_inv_fixup = NULL;
>  
>  	if (mode & EMIT_INVALIDATE)
>  		*cs++ = preparser_disable(false);
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index e1470bb60f34..7e8552414275 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -1258,6 +1258,34 @@ static bool completed(const struct
> i915_request *rq)
>  	return __i915_request_is_complete(rq);
>  }
>  
> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +{
> +	static const i915_reg_t vd[] = {
> +		GEN12_VD0_AUX_NV,
> +		GEN12_VD1_AUX_NV,
> +		GEN12_VD2_AUX_NV,
> +		GEN12_VD3_AUX_NV,
> +	};
> +
> +	static const i915_reg_t ve[] = {
> +		GEN12_VE0_AUX_NV,
> +		GEN12_VE1_AUX_NV,
> +	};
> +
> +	if (engine->class == VIDEO_DECODE_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
> +		return vd[engine->instance];
> +	}
> +
> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
> +		return ve[engine->instance];
> +	}
> +
> +	GEM_BUG_ON("unknown aux_inv reg\n");
> +	return INVALID_MMIO_REG;
> +}
> +
>  static void execlists_dequeue(struct intel_engine_cs *engine)

So in the previous implementation, this "worked" for both execlists and
guc submission. But how will this work now for GuC based submission?
This flow and the address of the engine is owned by the GuC.

If we are going to say this is an execlist only requirement (e.g.
platforms using GuC submission don't need this workaround), you should
add an if (!using guc submission) in the sequence you added to the
various emit_flush() routines above.

Thanks,
Stuart

>  {
>  	struct intel_engine_execlists * const execlists = &engine-
> >execlists;
> @@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct
> intel_engine_cs *engine)
>  			}
>  
>  			if (__i915_request_submit(rq)) {
> +				/* hsdes: 1809175790 */
> +				if (rq->aux_inv_fixup) {
> +					*rq->aux_inv_fixup =
> +						i915_mmio_reg_offset
> +							(aux_inv_reg(en
> gine));
> +					rq->execution_mask = engine-
> >mask;
> +				}
>  				if (!merge) {
>  					*port++ =
> i915_request_get(last);
>  					last = NULL;
> diff --git a/drivers/gpu/drm/i915/i915_request.h
> b/drivers/gpu/drm/i915/i915_request.h
> index 28b1f9db5487..8e0764c43936 100644
> --- a/drivers/gpu/drm/i915/i915_request.h
> +++ b/drivers/gpu/drm/i915/i915_request.h
> @@ -312,6 +312,8 @@ struct i915_request {
>  	struct i915_capture_list *capture_list;
>  #endif
>  
> +	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
> +
>  	/** Time at which this request was emitted, in jiffies. */
>  	unsigned long emitted_jiffies;
>  

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-16  4:43   ` Summers, Stuart
  0 siblings, 0 replies; 35+ messages in thread
From: Summers, Stuart @ 2022-03-16  4:43 UTC (permalink / raw)
  To: dri-devel, intel-gfx, Yang, Fei; +Cc: Wilson, Chris P

On Fri, 2022-03-04 at 14:14 -0800, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With this patch, auxiliary table invalidation is done only for the
> engine executing the request. And the mmio address for the aux_inv
> register is set after the engine instance becomes certain.
> 
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
>  drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
>  drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++---------
> --
>  .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
>  drivers/gpu/drm/i915/i915_request.h           |  2 +
>  5 files changed, 82 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> index 1c82caf525c3..0ec4986e4805 100644
> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> @@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32
> mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen2 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = MI_NOOP;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> index 5e65550b4dfb..efe51c4662fe 100644
> --- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> @@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq,
> u32 flags)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0;
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index b1b9c3fd7bf9..b6374cf53314 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq,
> u32 mode)
>  	*cs++ = 0; /* value */
>  	intel_ring_advance(rq, cs);
>  
> +	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  		intel_ring_advance(rq, cs);
>  	}
>  
> +	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
> +	rq->aux_inv_fixup = NULL;

This is a little ugly to me. Can we just set this to 0 or 0xdeadbeef by
default maybe and check that value below instead of retroactively
adding all of these assignments?

> +
>  	return 0;
>  }
>  
> @@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
>  	return MI_ARB_CHECK | 1 << 8 | state;
>  }
>  
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
>  static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32
> *cs)
>  {
>  	*cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq,
> u32 mode)
>  		intel_ring_advance(rq, cs);
>  	}
>  
> +	/* hsdes: 1809175790. aux_inv has been done above, no fixup
> needed */
> +	rq->aux_inv_fixup = NULL;
> +
>  	return 0;
>  }
>  
> @@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq,
> u32 mode)
>  	if (mode & EMIT_INVALIDATE)
>  		aux_inv = rq->engine->mask & ~BIT(BCS0);
>  	if (aux_inv)
> -		cmd += 2 * hweight32(aux_inv) + 2;
> +		cmd += 4;
>  
>  	cs = intel_ring_begin(rq, cmd);
>  	if (IS_ERR(cs))
> @@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request
> *rq, u32 mode)
>  	*cs++ = 0; /* value */
>  
>  	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv,
> tmp) {
> -			*cs++ =
> i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> +		/*
> +		 * We don't know which engine will eventually carry out
> +		 * this request, so the mmio aux_inv register address
> is
> +		 * unknown at this moment. We save the cs pointer
> supposed
> +		 * to hold the aux_inv address in rq->aux_inv_fixup and
> set
> +		 * it in execlists_dequeue() when the engine instance
> +		 * carrying out this request becomes certain
> +		 */
> +		*cs++ = MI_LOAD_REGISTER_IMM(1);
> +		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv
> */
> +		*cs++ = 0; /* mmio addr to be set at submission to HW
> */

Maybe MI_NOOP instead?

> +		*cs++ = AUX_INV;
>  		*cs++ = MI_NOOP;
> -	}
> +	} else

Can you add the brackets here on the else:
} else {
    aux_inv_fixup = NULL
}

Also good to run checkpatch. I see this showing up as a warning in the
checkpatch results.

> +		rq->aux_inv_fixup = NULL;
>  
>  	if (mode & EMIT_INVALIDATE)
>  		*cs++ = preparser_disable(false);
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index e1470bb60f34..7e8552414275 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -1258,6 +1258,34 @@ static bool completed(const struct
> i915_request *rq)
>  	return __i915_request_is_complete(rq);
>  }
>  
> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +{
> +	static const i915_reg_t vd[] = {
> +		GEN12_VD0_AUX_NV,
> +		GEN12_VD1_AUX_NV,
> +		GEN12_VD2_AUX_NV,
> +		GEN12_VD3_AUX_NV,
> +	};
> +
> +	static const i915_reg_t ve[] = {
> +		GEN12_VE0_AUX_NV,
> +		GEN12_VE1_AUX_NV,
> +	};
> +
> +	if (engine->class == VIDEO_DECODE_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
> +		return vd[engine->instance];
> +	}
> +
> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
> +		return ve[engine->instance];
> +	}
> +
> +	GEM_BUG_ON("unknown aux_inv reg\n");
> +	return INVALID_MMIO_REG;
> +}
> +
>  static void execlists_dequeue(struct intel_engine_cs *engine)

So in the previous implementation, this "worked" for both execlists and
guc submission. But how will this work now for GuC based submission?
This flow and the address of the engine is owned by the GuC.

If we are going to say this is an execlist only requirement (e.g.
platforms using GuC submission don't need this workaround), you should
add an if (!using guc submission) in the sequence you added to the
various emit_flush() routines above.

Thanks,
Stuart

>  {
>  	struct intel_engine_execlists * const execlists = &engine-
> >execlists;
> @@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct
> intel_engine_cs *engine)
>  			}
>  
>  			if (__i915_request_submit(rq)) {
> +				/* hsdes: 1809175790 */
> +				if (rq->aux_inv_fixup) {
> +					*rq->aux_inv_fixup =
> +						i915_mmio_reg_offset
> +							(aux_inv_reg(en
> gine));
> +					rq->execution_mask = engine-
> >mask;
> +				}
>  				if (!merge) {
>  					*port++ =
> i915_request_get(last);
>  					last = NULL;
> diff --git a/drivers/gpu/drm/i915/i915_request.h
> b/drivers/gpu/drm/i915/i915_request.h
> index 28b1f9db5487..8e0764c43936 100644
> --- a/drivers/gpu/drm/i915/i915_request.h
> +++ b/drivers/gpu/drm/i915/i915_request.h
> @@ -312,6 +312,8 @@ struct i915_request {
>  	struct i915_capture_list *capture_list;
>  #endif
>  
> +	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
> +
>  	/** Time at which this request was emitted, in jiffies. */
>  	unsigned long emitted_jiffies;
>  

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-16  4:43   ` [Intel-gfx] " Summers, Stuart
@ 2022-03-16  5:54     ` Yang, Fei
  -1 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16  5:54 UTC (permalink / raw)
  To: Summers, Stuart, dri-devel, intel-gfx; +Cc: Abodunrin, Akeem G, Wilson, Chris P

>> @@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq,
>> u32 mode)
>>  		intel_ring_advance(rq, cs);
>>  	}
>>  
>> +	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
>> +	rq->aux_inv_fixup = NULL;
>
> This is a little ugly to me. Can we just set this to 0 or 0xdeadbeef by default maybe and check that value below instead of retroactively adding all of these assignments?

The problem is there are many code paths that a i915_request could be allocated, I'm not aware of a unified routine where I could initialize the pointer for all i915_requests.

>> +
>>  	return 0;
>>  }
>>  
>> +		/*
>> +		 * We don't know which engine will eventually carry out
>> +		 * this request, so the mmio aux_inv register address
>> is
>> +		 * unknown at this moment. We save the cs pointer
>> supposed
>> +		 * to hold the aux_inv address in rq->aux_inv_fixup and
>> set
>> +		 * it in execlists_dequeue() when the engine instance
>> +		 * carrying out this request becomes certain
>> +		 */
>> +		*cs++ = MI_LOAD_REGISTER_IMM(1);
>> +		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv
>> */
>> +		*cs++ = 0; /* mmio addr to be set at submission to HW
>> */
>
>Maybe MI_NOOP instead?

This is supposed to be the mmio address field for the MI_LOAD_REGISTER_IMM instruction, setting it to 0 makes more sense?

>> +		*cs++ = AUX_INV;
>>  		*cs++ = MI_NOOP;
>> -	}
>> +	} else
>
> Can you add the brackets here on the else:
> } else {
>    aux_inv_fixup = NULL
> }
>
>Also good to run checkpatch. I see this showing up as a warning in the checkpatch results.

I noticed the warning, will update.

>> +		rq->aux_inv_fixup = NULL;
>>  
>>  	if (mode & EMIT_INVALIDATE)
>>  		*cs++ = preparser_disable(false);
>> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> index e1470bb60f34..7e8552414275 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request 
>> *rq)
>>  	return __i915_request_is_complete(rq);  }
>>  
>> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine) {
>> +	static const i915_reg_t vd[] = {
>> +		GEN12_VD0_AUX_NV,
>> +		GEN12_VD1_AUX_NV,
>> +		GEN12_VD2_AUX_NV,
>> +		GEN12_VD3_AUX_NV,
>> +	};
>> +
>> +	static const i915_reg_t ve[] = {
>> +		GEN12_VE0_AUX_NV,
>> +		GEN12_VE1_AUX_NV,
>> +	};
>> +
>> +	if (engine->class == VIDEO_DECODE_CLASS) {
>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
>> +		return vd[engine->instance];
>> +	}
>> +
>> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
>> +		return ve[engine->instance];
>> +	}
>> +
>> +	GEM_BUG_ON("unknown aux_inv reg\n");
>> +	return INVALID_MMIO_REG;
>> +}
>> +
>>  static void execlists_dequeue(struct intel_engine_cs *engine)
> 
> So in the previous implementation, this "worked" for both execlists and guc submission. But how will this work now for GuC based submission?
> This flow and the address of the engine is owned by the GuC.
>
> If we are going to say this is an execlist only requirement (e.g.
> platforms using GuC submission don't need this workaround), you should add an if (!using guc submission) in the sequence you added to the various emit_flush() routines above.

Good point.
I didn't consider GuC submission because Chrome doesn't enable GuC for TGL. But it is true that the implementation will have problem with GuC submission.
I'm not sure if it's possible for i915 to know which engine will eventually carry out the request because it might be scheduled by GuC. I will need to investigate.

> Thanks,
> Stuart


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-16  5:54     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16  5:54 UTC (permalink / raw)
  To: Summers, Stuart, dri-devel, intel-gfx; +Cc: Wilson, Chris P

>> @@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq,
>> u32 mode)
>>  		intel_ring_advance(rq, cs);
>>  	}
>>  
>> +	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
>> +	rq->aux_inv_fixup = NULL;
>
> This is a little ugly to me. Can we just set this to 0 or 0xdeadbeef by default maybe and check that value below instead of retroactively adding all of these assignments?

The problem is there are many code paths that a i915_request could be allocated, I'm not aware of a unified routine where I could initialize the pointer for all i915_requests.

>> +
>>  	return 0;
>>  }
>>  
>> +		/*
>> +		 * We don't know which engine will eventually carry out
>> +		 * this request, so the mmio aux_inv register address
>> is
>> +		 * unknown at this moment. We save the cs pointer
>> supposed
>> +		 * to hold the aux_inv address in rq->aux_inv_fixup and
>> set
>> +		 * it in execlists_dequeue() when the engine instance
>> +		 * carrying out this request becomes certain
>> +		 */
>> +		*cs++ = MI_LOAD_REGISTER_IMM(1);
>> +		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv
>> */
>> +		*cs++ = 0; /* mmio addr to be set at submission to HW
>> */
>
>Maybe MI_NOOP instead?

This is supposed to be the mmio address field for the MI_LOAD_REGISTER_IMM instruction, setting it to 0 makes more sense?

>> +		*cs++ = AUX_INV;
>>  		*cs++ = MI_NOOP;
>> -	}
>> +	} else
>
> Can you add the brackets here on the else:
> } else {
>    aux_inv_fixup = NULL
> }
>
>Also good to run checkpatch. I see this showing up as a warning in the checkpatch results.

I noticed the warning, will update.

>> +		rq->aux_inv_fixup = NULL;
>>  
>>  	if (mode & EMIT_INVALIDATE)
>>  		*cs++ = preparser_disable(false);
>> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> index e1470bb60f34..7e8552414275 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request 
>> *rq)
>>  	return __i915_request_is_complete(rq);  }
>>  
>> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine) {
>> +	static const i915_reg_t vd[] = {
>> +		GEN12_VD0_AUX_NV,
>> +		GEN12_VD1_AUX_NV,
>> +		GEN12_VD2_AUX_NV,
>> +		GEN12_VD3_AUX_NV,
>> +	};
>> +
>> +	static const i915_reg_t ve[] = {
>> +		GEN12_VE0_AUX_NV,
>> +		GEN12_VE1_AUX_NV,
>> +	};
>> +
>> +	if (engine->class == VIDEO_DECODE_CLASS) {
>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
>> +		return vd[engine->instance];
>> +	}
>> +
>> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
>> +		return ve[engine->instance];
>> +	}
>> +
>> +	GEM_BUG_ON("unknown aux_inv reg\n");
>> +	return INVALID_MMIO_REG;
>> +}
>> +
>>  static void execlists_dequeue(struct intel_engine_cs *engine)
> 
> So in the previous implementation, this "worked" for both execlists and guc submission. But how will this work now for GuC based submission?
> This flow and the address of the engine is owned by the GuC.
>
> If we are going to say this is an execlist only requirement (e.g.
> platforms using GuC submission don't need this workaround), you should add an if (!using guc submission) in the sequence you added to the various emit_flush() routines above.

Good point.
I didn't consider GuC submission because Chrome doesn't enable GuC for TGL. But it is true that the implementation will have problem with GuC submission.
I'm not sure if it's possible for i915 to know which engine will eventually carry out the request because it might be scheduled by GuC. I will need to investigate.

> Thanks,
> Stuart


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx]  ✗ Fi.CI.IGT: failure for drm/i915: avoid concurrent writes to aux_inv (rev5)
  2022-03-16  3:22   ` Summers, Stuart
@ 2022-03-16  5:58     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16  5:58 UTC (permalink / raw)
  To: Summers, Stuart, intel-gfx

[-- Attachment #1: Type: text/plain, Size: 28335 bytes --]

Confirmed this is a regression caused by the patch. Will debug further.

From: Summers, Stuart <stuart.summers@intel.com>
Sent: Tuesday, March 15, 2022 8:23 PM
To: intel-gfx@lists.freedesktop.org; Yang, Fei <fei.yang@intel.com>
Subject: Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: avoid concurrent writes to aux_inv (rev5)

On Sat, 2022-03-05 at 09:36 +0000, Patchwork wrote:
Patch Details
Series:
drm/i915: avoid concurrent writes to aux_inv (rev5)
URL:
https://patchwork.freedesktop.org/series/100772/
State:
failure
Details:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/index.html
CI Bug Log - changes from CI_DRM_11330_full -> Patchwork_22492_full
Summary

FAILURE

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

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

Participating hosts (13 -> 13)

No changes in participating hosts

Possible new issues

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

IGT changes
Possible regressions

  *   igt@gem_exec_balancer@fairslice:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb8/igt@gem_exec_balancer@fairslice.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb3/igt@gem_exec_balancer@fairslice.html>

I don't think the one below is related, but can you check on the above failure to make sure that isn't a result of your patch?

Thanks,
Stuart


  *
  *   igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb1/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-blt.html>

Suppressed

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

  *   igt@api_intel_allocator@fork-simple-stress-signal:

     *   {shard-dg1}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-dg1-13/igt@api_intel_allocator@fork-simple-stress-signal.html> -> TIMEOUT<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-16/igt@api_intel_allocator@fork-simple-stress-signal.html>

  *   igt@drm_import_export@import-close-race-prime:

     *   {shard-rkl}: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-1/igt@drm_import_export@import-close-race-prime.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-5/igt@drm_import_export@import-close-race-prime.html> +1 similar issue

  *   {igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale}:

     *   {shard-rkl}: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@kms_plane_scaling@planes-upscale-factor-0-25-downscale-factor-0-5@pipe-a-edp-1-planes-upscale-downscale.html> +2 similar issues

  *   igt@prime_mmap_coherency@ioctl-errors:

     *   {shard-dg1}: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-dg1-12/igt@prime_mmap_coherency@ioctl-errors.html>

Known issues

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

CI changes
Possible fixes

  *   boot:

     *   shard-glk: (PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk1/boot.html>) ([i915#4392]) -> (PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk8/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk7/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk4/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk3/boot.html>)

IGT changes
Issues hit

  *   igt@gem_ctx_sseu@invalid-sseu:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_ctx_sseu@invalid-sseu.html> ([i915#280])

  *   igt@gem_eio@kms:

     *   shard-tglb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglb6/igt@gem_eio@kms.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb1/igt@gem_eio@kms.html> ([i915#232])

  *   igt@gem_exec_fair@basic-none-solo@rcs0:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl1/igt@gem_exec_fair@basic-none-solo@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842])
     *   shard-tglb: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842])

  *   igt@gem_exec_fair@basic-none@vecs0:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl6/igt@gem_exec_fair@basic-none@vecs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@gem_exec_fair@basic-none@vecs0.html> ([i915#2842]) +1 similar issue

  *   igt@gem_exec_fair@basic-pace@rcs0:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_exec_fair@basic-pace@rcs0.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk1/igt@gem_exec_fair@basic-pace@rcs0.html> ([i915#2842])

  *   igt@gem_lmem_swapping@parallel-random:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl6/igt@gem_lmem_swapping@parallel-random.html> ([fdo#109271] / [i915#4613])

  *   igt@gem_lmem_swapping@smem-oom:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@gem_lmem_swapping@smem-oom.html> ([fdo#109271] / [i915#4613]) +2 similar issues

  *   igt@gem_pxp@reject-modify-context-protection-off-2:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gem_pxp@reject-modify-context-protection-off-2.html> ([i915#4270])

  *   igt@gem_userptr_blits@input-checking:

     *   shard-glk: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@gem_userptr_blits@input-checking.html> ([i915#4991])

  *   igt@gen7_exec_parse@chained-batch:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@gen7_exec_parse@chained-batch.html> ([fdo#109289])

  *   igt@gen9_exec_parse@basic-rejected-ctx-param:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@gen9_exec_parse@basic-rejected-ctx-param.html> ([i915#2856])

  *   igt@gen9_exec_parse@batch-invalid-length:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@gen9_exec_parse@batch-invalid-length.html> ([i915#2527] / [i915#2856])

  *   igt@i915_pm_sseu@full-enable:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@i915_pm_sseu@full-enable.html> ([i915#4387])

  *   igt@i915_selftest@live@hangcheck:

     *   shard-snb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-snb7/igt@i915_selftest@live@hangcheck.html> -> INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-snb7/igt@i915_selftest@live@hangcheck.html> ([i915#3921])

  *   igt@kms_big_fb@linear-32bpp-rotate-270:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@linear-32bpp-rotate-270.html> ([fdo#111614])

  *   igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html> ([i915#3743])

  *   igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html> ([fdo#109271] / [i915#3777]) +1 similar issue
     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html> ([fdo#109271] / [i915#3777])

  *   igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html> ([fdo#111615]) +1 similar issue

  *   igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886])

  *   igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-a-missing-ccs-buffer-yf_tiled_ccs.html> ([fdo#111615] / [i915#3689])

  *   igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_ccs@pipe-b-bad-rotation-90-y_tiled_gen12_mc_ccs.html> ([i915#3689] / [i915#3886]) +2 similar issues

  *   igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_ccs@pipe-c-bad-rotation-90-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886]) +2 similar issues

  *   igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_ccs@pipe-c-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html> ([fdo#109271] / [i915#3886]) +7 similar issues

  *   igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_ccs@pipe-d-crc-sprite-planes-basic-y_tiled_ccs.html> ([i915#3689]) +1 similar issue

  *   igt@kms_chamelium@hdmi-audio-edid:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_chamelium@hdmi-audio-edid.html> ([fdo#109284] / [fdo#111827]) +2 similar issues

  *   igt@kms_chamelium@vga-hpd-for-each-pipe:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_chamelium@vga-hpd-for-each-pipe.html> ([fdo#109271] / [fdo#111827]) +17 similar issues

  *   igt@kms_color_chamelium@pipe-c-ctm-max:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_color_chamelium@pipe-c-ctm-max.html> ([fdo#109271] / [fdo#111827]) +4 similar issues

  *   igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-a-cursor-512x512-sliding.html> ([fdo#109278] / [fdo#109279])

  *   igt@kms_cursor_crc@pipe-b-cursor-32x10-random:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_cursor_crc@pipe-b-cursor-32x10-random.html> ([i915#3359])

  *   igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_cursor_crc@pipe-c-cursor-512x512-rapid-movement.html> ([fdo#109279] / [i915#3359]) +1 similar issue

  *   igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_crc@pipe-d-cursor-512x512-rapid-movement.html> ([fdo#109278]) +4 similar issues

  *   igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size.html> ([fdo#109274] / [fdo#109278])

  *   igt@kms_cursor_legacy@flip-vs-cursor-varying-size:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb4/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html> ([i915#2346])

  *   igt@kms_flip@2x-flip-vs-panning-interruptible:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip@2x-flip-vs-panning-interruptible.html> ([fdo#109274] / [fdo#111825]) +1 similar issue

  *   igt@kms_flip@2x-plain-flip-fb-recreate:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_flip@2x-plain-flip-fb-recreate.html> ([fdo#109274])

  *   igt@kms_flip@flip-vs-expired-vblank@b-dp1:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl6/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html> ([i915#79])

  *   igt@kms_flip@flip-vs-suspend@a-dp1:

     *   shard-apl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@kms_flip@flip-vs-suspend@a-dp1.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl7/igt@kms_flip@flip-vs-suspend@a-dp1.html> ([i915#180]) +3 similar issues

  *   igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html> ([i915#2587])

  *   igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc.html> ([fdo#109280] / [fdo#111825]) +15 similar issues

  *   igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-spr-indfb-fullscreen.html> ([fdo#109280]) +2 similar issues

  *   igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html> ([fdo#109271]) +82 similar issues

  *   igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render:

     *   shard-glk: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk6/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-render.html> ([fdo#109271]) +15 similar issues

  *   igt@kms_hdr@bpc-switch-suspend:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_hdr@bpc-switch-suspend.html> ([i915#1188])

  *   igt@kms_pipe_crc_basic@hang-read-crc-pipe-d:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-d.html> ([fdo#109271] / [i915#533]) +1 similar issue

  *   igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl4/igt@kms_pipe_crc_basic@read-crc-pipe-d-frame-sequence.html> ([fdo#109271] / [i915#533])

  *   igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max.html> ([fdo#108145] / [i915#265]) +2 similar issues

  *   igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html> ([i915#265])

  *   igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:

     *   shard-skl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html> ([fdo#108145] / [i915#265])

  *   igt@kms_psr2_sf@cursor-plane-update-sf:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@kms_psr2_sf@cursor-plane-update-sf.html> ([fdo#109271] / [i915#658]) +2 similar issues

  *   igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area.html> ([fdo#109271] / [i915#658])

  *   igt@kms_psr@psr2_sprite_mmap_gtt:

     *   shard-iclb: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html> -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html> ([fdo#109441])

  *   igt@kms_psr@psr2_suspend:

     *   shard-tglb: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@kms_psr@psr2_suspend.html> ([i915#132] / [i915#3467]) +1 similar issue

  *   igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html> ([fdo#109271]) +187 similar issues

  *   igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-c.html> ([i915#5030]) +2 similar issues

  *   igt@kms_setmode@basic:

     *   shard-glk: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk7/igt@kms_setmode@basic.html> -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk9/igt@kms_setmode@basic.html> ([i915#31])

  *   igt@kms_sysfs_edid_timing:

     *   shard-skl: NOTRUN -> FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl10/igt@kms_sysfs_edid_timing.html> ([IGT#2])

  *   igt@kms_writeback@writeback-pixel-formats:

     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@kms_writeback@writeback-pixel-formats.html> ([fdo#109271] / [i915#2437])
     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@kms_writeback@writeback-pixel-formats.html> ([i915#2437])
     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@kms_writeback@writeback-pixel-formats.html> ([fdo#109271] / [i915#2437])

  *   igt@perf_pmu@rc6-suspend:

     *   shard-kbl: PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@perf_pmu@rc6-suspend.html> -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl7/igt@perf_pmu@rc6-suspend.html> ([i915#180])

  *   igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb8/igt@prime_nv_api@nv_i915_reimport_twice_check_flink_name.html> ([fdo#109291]) +1 similar issue

  *   igt@prime_nv_pcopy@test3_5:

     *   shard-iclb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-iclb8/igt@prime_nv_pcopy@test3_5.html> ([fdo#109291])

  *   igt@sysfs_clients@pidname:

     *   shard-apl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl2/igt@sysfs_clients@pidname.html> ([fdo#109271] / [i915#2994])
     *   shard-skl: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl4/igt@sysfs_clients@pidname.html> ([fdo#109271] / [i915#2994])

  *   igt@sysfs_clients@sema-25:

     *   shard-tglb: NOTRUN -> SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglb7/igt@sysfs_clients@sema-25.html> ([i915#2994])

  *   igt@sysfs_heartbeat_interval@mixed@rcs0:

     *   shard-skl: NOTRUN -> DMESG-WARN<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-skl7/igt@sysfs_heartbeat_interval@mixed@rcs0.html> ([i915#1982])

Possible fixes

  *   igt@fbdev@unaligned-read:

     *   {shard-rkl}: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@fbdev@unaligned-read.html> ([i915#2582]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-6/igt@fbdev@unaligned-read.html>

  *   igt@gem_ctx_persistence@engines-hostile@vcs0:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html> ([i915#2410]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl3/igt@gem_ctx_persistence@engines-hostile@vcs0.html>

  *   igt@gem_ctx_persistence@smoketest:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk9/igt@gem_ctx_persistence@smoketest.html> -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk2/igt@gem_ctx_persistence@smoketest.html>

  *   igt@gem_exec_endless@dispatch@vcs1:

     *   {shard-tglu}: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-1/igt@gem_exec_endless@dispatch@vcs1.html> ([i915#3778]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-6/igt@gem_exec_endless@dispatch@vcs1.html>

  *   igt@gem_exec_fair@basic-none-rrul@rcs0:

     *   shard-glk: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-glk2/igt@gem_exec_fair@basic-none-rrul@rcs0.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-glk5/igt@gem_exec_fair@basic-none-rrul@rcs0.html> +1 similar issue

  *   igt@gem_exec_fair@basic-none-solo@rcs0:

     *   shard-apl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-apl8/igt@gem_exec_fair@basic-none-solo@rcs0.html>

  *   igt@gem_exec_fair@basic-none@vcs1:

     *   shard-kbl: FAIL<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-kbl4/igt@gem_exec_fair@basic-none@vcs1.html> ([i915#2842]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-kbl1/igt@gem_exec_fair@basic-none@vcs1.html>

  *   igt@gem_exec_schedule@smoketest-all:

     *   {shard-rkl}: INCOMPLETE<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-5/igt@gem_exec_schedule@smoketest-all.html> -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-rkl-1/igt@gem_exec_schedule@smoketest-all.html>

  *   igt@i915_pm_dc@dc9-dpms:

     *   {shard-tglu}: SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-tglu-3/igt@i915_pm_dc@dc9-dpms.html> ([i915#4281]) -> PASS<https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22492/shard-tglu-2/igt@i915_pm_dc@dc9-dpms.html>

  *   igt@kms_big_fb@linear-64bpp-rotate-0:

     *   {shard-rkl}: (SKIP<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-4/igt@kms_big_fb@linear-64bpp-rotate-0.html>, PASS<https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11330/shard-rkl-6/igt@kms_big_fb@linear-64bpp-rotate-0.h>) ([i915#1845]) -> [PASS][161]

[-- Attachment #2: Type: text/html, Size: 68077 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-16  5:54     ` [Intel-gfx] " Yang, Fei
@ 2022-03-16  7:19       ` Yang, Fei
  -1 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16  7:19 UTC (permalink / raw)
  To: Summers, Stuart, dri-devel, intel-gfx; +Cc: Abodunrin, Akeem G, Wilson, Chris P

>>> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> index e1470bb60f34..7e8552414275 100644
>>> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request 
>>> *rq)
>>>  	return __i915_request_is_complete(rq);  }
>>>  
>>> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine) {
>>> +	static const i915_reg_t vd[] = {
>>> +		GEN12_VD0_AUX_NV,
>>> +		GEN12_VD1_AUX_NV,
>>> +		GEN12_VD2_AUX_NV,
>>> +		GEN12_VD3_AUX_NV,
>>> +	};
>>> +
>>> +	static const i915_reg_t ve[] = {
>>> +		GEN12_VE0_AUX_NV,
>>> +		GEN12_VE1_AUX_NV,
>>> +	};
>>> +
>>> +	if (engine->class == VIDEO_DECODE_CLASS) {
>>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
>>> +		return vd[engine->instance];
>>> +	}
>>> +
>>> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
>>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
>>> +		return ve[engine->instance];
>>> +	}
>>> +
>>> +	GEM_BUG_ON("unknown aux_inv reg\n");
>>> +	return INVALID_MMIO_REG;
>>> +}
>>> +
>>>  static void execlists_dequeue(struct intel_engine_cs *engine)
>> 
>> So in the previous implementation, this "worked" for both execlists and guc submission. But how will this work now for GuC based submission?
>> This flow and the address of the engine is owned by the GuC.
>>
>> If we are going to say this is an execlist only requirement (e.g.
>> platforms using GuC submission don't need this workaround), you should add an if (!using guc submission) in the sequence you added to the various emit_flush() routines above.
>
> Good point.
> I didn't consider GuC submission because Chrome doesn't enable GuC for TGL. But it is true that the implementation will have problem with GuC submission.
> I'm not sure if it's possible for i915 to know which engine will eventually carry out the request because it might be scheduled by GuC. I will need to investigate.

I think the same can be done in intel_guc_submission.c after __i915_request_submit(rq) calls.

>> Thanks,
>> Stuart


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-16  7:19       ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16  7:19 UTC (permalink / raw)
  To: Summers, Stuart, dri-devel, intel-gfx; +Cc: Wilson, Chris P

>>> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> index e1470bb60f34..7e8552414275 100644
>>> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
>>> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request 
>>> *rq)
>>>  	return __i915_request_is_complete(rq);  }
>>>  
>>> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine) {
>>> +	static const i915_reg_t vd[] = {
>>> +		GEN12_VD0_AUX_NV,
>>> +		GEN12_VD1_AUX_NV,
>>> +		GEN12_VD2_AUX_NV,
>>> +		GEN12_VD3_AUX_NV,
>>> +	};
>>> +
>>> +	static const i915_reg_t ve[] = {
>>> +		GEN12_VE0_AUX_NV,
>>> +		GEN12_VE1_AUX_NV,
>>> +	};
>>> +
>>> +	if (engine->class == VIDEO_DECODE_CLASS) {
>>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
>>> +		return vd[engine->instance];
>>> +	}
>>> +
>>> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
>>> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
>>> +		return ve[engine->instance];
>>> +	}
>>> +
>>> +	GEM_BUG_ON("unknown aux_inv reg\n");
>>> +	return INVALID_MMIO_REG;
>>> +}
>>> +
>>>  static void execlists_dequeue(struct intel_engine_cs *engine)
>> 
>> So in the previous implementation, this "worked" for both execlists and guc submission. But how will this work now for GuC based submission?
>> This flow and the address of the engine is owned by the GuC.
>>
>> If we are going to say this is an execlist only requirement (e.g.
>> platforms using GuC submission don't need this workaround), you should add an if (!using guc submission) in the sequence you added to the various emit_flush() routines above.
>
> Good point.
> I didn't consider GuC submission because Chrome doesn't enable GuC for TGL. But it is true that the implementation will have problem with GuC submission.
> I'm not sure if it's possible for i915 to know which engine will eventually carry out the request because it might be scheduled by GuC. I will need to investigate.

I think the same can be done in intel_guc_submission.c after __i915_request_submit(rq) calls.

>> Thanks,
>> Stuart


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-04 22:14 ` [Intel-gfx] " fei.yang
                   ` (5 preceding siblings ...)
  (?)
@ 2022-03-16 10:03 ` Tvrtko Ursulin
  2022-03-16 18:25     ` Yang, Fei
  -1 siblings, 1 reply; 35+ messages in thread
From: Tvrtko Ursulin @ 2022-03-16 10:03 UTC (permalink / raw)
  To: fei.yang, intel-gfx, dri-devel; +Cc: chris.p.wilson


On 04/03/2022 22:14, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With this patch, auxiliary table invalidation is done only for the
> engine executing the request. And the mmio address for the aux_inv
> register is set after the engine instance becomes certain.
> 
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
>   drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++-----------
>   .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
>   drivers/gpu/drm/i915/i915_request.h           |  2 +
>   5 files changed, 82 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> index 1c82caf525c3..0ec4986e4805 100644
> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
> @@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 mode)
>   
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen2 */
> +	rq->aux_inv_fixup = NULL;

Same thing that Stuart mentioned - would it not work for instance to 
initialize this in __i915_request_create?

> +
>   	return 0;
>   }
>   
> @@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq, u32 mode)
>   	*cs++ = MI_NOOP;
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> index 5e65550b4dfb..efe51c4662fe 100644
> --- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
> @@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0;
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq, u32 flags)
>   
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen6 */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0;
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index b1b9c3fd7bf9..b6374cf53314 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   	intel_ring_advance(rq, cs);
>   
> +	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   		intel_ring_advance(rq, cs);
>   	}
>   
> +	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
>   	return MI_ARB_CHECK | 1 << 8 | state;
>   }
>   
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
>   static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>   {
>   	*cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   		intel_ring_advance(rq, cs);
>   	}
>   
> +	/* hsdes: 1809175790. aux_inv has been done above, no fixup needed */
> +	rq->aux_inv_fixup = NULL;
> +
>   	return 0;
>   }
>   
> @@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	if (mode & EMIT_INVALIDATE)
>   		aux_inv = rq->engine->mask & ~BIT(BCS0);
>   	if (aux_inv)
> -		cmd += 2 * hweight32(aux_inv) + 2;
> +		cmd += 4;
>   
>   	cs = intel_ring_begin(rq, cmd);
>   	if (IS_ERR(cs))
> @@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   
>   	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> +		/*
> +		 * We don't know which engine will eventually carry out
> +		 * this request, so the mmio aux_inv register address is
> +		 * unknown at this moment. We save the cs pointer supposed
> +		 * to hold the aux_inv address in rq->aux_inv_fixup and set
> +		 * it in execlists_dequeue() when the engine instance
> +		 * carrying out this request becomes certain
> +		 */
> +		*cs++ = MI_LOAD_REGISTER_IMM(1);
> +		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv */
> +		*cs++ = 0; /* mmio addr to be set at submission to HW */
> +		*cs++ = AUX_INV;
>   		*cs++ = MI_NOOP;
> -	}
> +	} else
> +		rq->aux_inv_fixup = NULL;
>   
>   	if (mode & EMIT_INVALIDATE)
>   		*cs++ = preparser_disable(false);
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index e1470bb60f34..7e8552414275 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
>   	return __i915_request_is_complete(rq);
>   }
>   
> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +{
> +	static const i915_reg_t vd[] = {
> +		GEN12_VD0_AUX_NV,
> +		GEN12_VD1_AUX_NV,
> +		GEN12_VD2_AUX_NV,
> +		GEN12_VD3_AUX_NV,
> +	};
> +
> +	static const i915_reg_t ve[] = {
> +		GEN12_VE0_AUX_NV,
> +		GEN12_VE1_AUX_NV,
> +	};
> +
> +	if (engine->class == VIDEO_DECODE_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
> +		return vd[engine->instance];
> +	}
> +
> +	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
> +		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
> +		return ve[engine->instance];
> +	}
> +
> +	GEM_BUG_ON("unknown aux_inv reg\n");
> +	return INVALID_MMIO_REG;
> +}
> +
>   static void execlists_dequeue(struct intel_engine_cs *engine)
>   {
>   	struct intel_engine_execlists * const execlists = &engine->execlists;
> @@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>   			}
>   
>   			if (__i915_request_submit(rq)) {
> +				/* hsdes: 1809175790 */
> +				if (rq->aux_inv_fixup) {
> +					*rq->aux_inv_fixup =
> +						i915_mmio_reg_offset
> +							(aux_inv_reg(engine));
> +					rq->execution_mask = engine->mask;

Execution mask assignment needs a comment explaining what, why, and what 
are the consequences of fixing the mask here.

Also, from the top of my head for instance I can't remember why would 
aux_inv_fixup handling be just here and not in the first/virtual dequeue 
loop (the "while ... first_virtual_engine" one)? I thought the 2nd loop 
is non-virtual requests, but I am probably missing something.

> +				}
>   				if (!merge) {
>   					*port++ = i915_request_get(last);
>   					last = NULL;
> diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
> index 28b1f9db5487..8e0764c43936 100644
> --- a/drivers/gpu/drm/i915/i915_request.h
> +++ b/drivers/gpu/drm/i915/i915_request.h
> @@ -312,6 +312,8 @@ struct i915_request {
>   	struct i915_capture_list *capture_list;
>   #endif
>   
> +	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
> +
>   	/** Time at which this request was emitted, in jiffies. */
>   	unsigned long emitted_jiffies;
>   

Question of affected platforms and how will this be handled in case of 
GuC? I don't see how it can without the firmware involvement. Only if 
i915 would nerf the virtual engine setup so each GuC virtual context 
gets only one engine from the set, but that would be beyond horrible. 
Best to involved GuC people here.

Regards,

Tvrtko

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-16 10:03 ` Tvrtko Ursulin
@ 2022-03-16 18:25     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16 18:25 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx, dri-devel; +Cc: Wilson, Chris P

>> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c 
>> b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> index 1c82caf525c3..0ec4986e4805 100644
>> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> @@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 
>> mode)
>>   
>>   	intel_ring_advance(rq, cs);
>>   
>> +	/* hsdes: 1809175790. No fixup needed for gen2 */
>> +	rq->aux_inv_fixup = NULL;
>
> Same thing that Stuart mentioned - would it not work for instance to initialize this in __i915_request_create?

I didn't try __i915_request_create because there is code like the following in the driver, and I'm not sure how many such allocation is there. I will give it a shot.
struct measure_breadcrumb {
        struct i915_request rq;
        struct intel_ring ring;
        u32 cs[2048];
};

static int measure_breadcrumb_dw(struct intel_context *ce)
{
        struct intel_engine_cs *engine = ce->engine;
        struct measure_breadcrumb *frame;
        int dw;

        GEM_BUG_ON(!engine->gt->scratch);

        frame = kzalloc(sizeof(*frame), GFP_KERNEL);
        if (!frame)
                return -ENOMEM;

        frame->rq.engine = engine;
        frame->rq.context = ce;
        ...
}
>> +
>>   	return 0;
>>   }
>>   

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-16 18:25     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-16 18:25 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx, dri-devel; +Cc: Wilson, Chris P

>> diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c 
>> b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> index 1c82caf525c3..0ec4986e4805 100644
>> --- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> +++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
>> @@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 
>> mode)
>>   
>>   	intel_ring_advance(rq, cs);
>>   
>> +	/* hsdes: 1809175790. No fixup needed for gen2 */
>> +	rq->aux_inv_fixup = NULL;
>
> Same thing that Stuart mentioned - would it not work for instance to initialize this in __i915_request_create?

I didn't try __i915_request_create because there is code like the following in the driver, and I'm not sure how many such allocation is there. I will give it a shot.
struct measure_breadcrumb {
        struct i915_request rq;
        struct intel_ring ring;
        u32 cs[2048];
};

static int measure_breadcrumb_dw(struct intel_context *ce)
{
        struct intel_engine_cs *engine = ce->engine;
        struct measure_breadcrumb *frame;
        int dw;

        GEM_BUG_ON(!engine->gt->scratch);

        frame = kzalloc(sizeof(*frame), GFP_KERNEL);
        if (!frame)
                return -ENOMEM;

        frame->rq.engine = engine;
        frame->rq.context = ce;
        ...
}
>> +
>>   	return 0;
>>   }
>>   

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-28 17:16 fei.yang
@ 2022-03-29  7:51 ` Tvrtko Ursulin
  0 siblings, 0 replies; 35+ messages in thread
From: Tvrtko Ursulin @ 2022-03-29  7:51 UTC (permalink / raw)
  To: fei.yang, intel-gfx; +Cc: dri-devel, chris.p.wilson


On 28/03/2022 18:16, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With the MMIO remap feature, we can actually set bit 17 of MI_LRI
> instruction and let the hardware to figure out the local aux_inv
> register at runtime to avoid invalidating auxiliary table for all
> engines.
> 
> Bspec: 45728
> 
> v2: Invalidate AUX table for indirect context as well.
> 
> Cc: Stuart Summers <stuart.summers@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

> ---
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 50 +++++---------------
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.h     |  4 +-
>   drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
>   drivers/gpu/drm/i915/gt/intel_lrc.c          | 12 +++++
>   4 files changed, 27 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index 36148887c699..047b5a710149 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -6,7 +6,6 @@
>   #include "gen8_engine_cs.h"
>   #include "i915_drv.h"
>   #include "intel_gpu_commands.h"
> -#include "intel_gt_regs.h"
>   #include "intel_lrc.h"
>   #include "intel_ring.h"
>   
> @@ -165,33 +164,9 @@ static u32 preparser_disable(bool state)
>   	return MI_ARB_CHECK | 1 << 8 | state;
>   }
>   
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +u32 *gen12_emit_aux_table_inv(u32 *cs, const i915_reg_t inv_reg)
>   {
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
> -static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
> -{
> -	*cs++ = MI_LOAD_REGISTER_IMM(1);
> +	*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
>   	*cs++ = i915_mmio_reg_offset(inv_reg);
>   	*cs++ = AUX_INV;
>   	*cs++ = MI_NOOP;
> @@ -274,7 +249,7 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
>   
>   		if (!HAS_FLAT_CCS(rq->engine->i915)) {
>   			/* hsdes: 1809175790 */
> -			cs = gen12_emit_aux_table_inv(GEN12_GFX_CCS_AUX_NV, cs);
> +			cs = gen12_emit_aux_table_inv(cs, GEN12_GFX_CCS_AUX_NV);
>   		}
>   
>   		*cs++ = preparser_disable(false);
> @@ -293,10 +268,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	if (mode & EMIT_INVALIDATE) {
>   		cmd += 2;
>   
> -		if (!HAS_FLAT_CCS(rq->engine->i915)) {
> +		if (!HAS_FLAT_CCS(rq->engine->i915) &&
> +		    (rq->engine->class == VIDEO_DECODE_CLASS ||
> +		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>   			if (aux_inv)
> -				cmd += 2 * hweight32(aux_inv) + 2;
> +				cmd += 4;
>   		}
>   	}
>   
> @@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   
>   	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> -		*cs++ = MI_NOOP;
> +		if (rq->engine->class == VIDEO_DECODE_CLASS)
> +			cs = gen12_emit_aux_table_inv(cs, GEN12_VD0_AUX_NV);
> +		else
> +			cs = gen12_emit_aux_table_inv(cs, GEN12_VE0_AUX_NV);
>   	}
>   
>   	if (mode & EMIT_INVALIDATE)
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> index cc6e21d3662a..107ab42539ab 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> @@ -10,7 +10,7 @@
>   #include <linux/types.h>
>   
>   #include "i915_gem.h" /* GEM_BUG_ON */
> -
> +#include "intel_gt_regs.h"
>   #include "intel_gpu_commands.h"
>   
>   struct i915_request;
> @@ -38,6 +38,8 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   
> +u32 *gen12_emit_aux_table_inv(u32 *cs, const i915_reg_t inv_reg);
> +
>   static inline u32 *
>   __gen8_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
>   {
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index d112ffd56418..4243be030bc1 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -144,6 +144,7 @@
>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
> +#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
>   #define   MI_LRI_FORCE_POSTED		(1<<12)
>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 07bef7128fdb..dffef6ab4baf 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1208,6 +1208,10 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
>   	    IS_DG2_G11(ce->engine->i915))
>   		cs = gen8_emit_pipe_control(cs, PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);
>   
> +	/* hsdes: 1809175790 */
> +	if (!HAS_FLAT_CCS(ce->engine->i915))
> +		cs = gen12_emit_aux_table_inv(cs, GEN12_GFX_CCS_AUX_NV);
> +
>   	return cs;
>   }
>   
> @@ -1225,6 +1229,14 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
>   						    PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,
>   						    0);
>   
> +	/* hsdes: 1809175790 */
> +	if (!HAS_FLAT_CCS(ce->engine->i915)) {
> +		if (ce->engine->class == VIDEO_DECODE_CLASS)
> +			cs = gen12_emit_aux_table_inv(cs, GEN12_VD0_AUX_NV);
> +		else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
> +			cs = gen12_emit_aux_table_inv(cs, GEN12_VE0_AUX_NV);
> +	}
> +
>   	return cs;
>   }
>   

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-28  8:37 ` Tvrtko Ursulin
@ 2022-03-28 17:58     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-28 17:58 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx; +Cc: dri-devel, Wilson, Chris P

>> +u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>> -static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>
> I think all helpers which emit to ring take cs as the first argument so it would be good to make this consistent.

Updated the patch, please review rev10.
This helper function has been there for a long while, I was hesitant to change. But I agree cs should be the first argument. Since I removed the "static" anyway, so might just change the order all together.

>> @@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   	*cs++ = 0; /* value */
>>   
>>   	if (aux_inv) { /* hsdes: 1809175790 */
>> -		struct intel_engine_cs *engine;
>> -		unsigned int tmp;
>> -
>> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
>> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
>> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
>> -			*cs++ = AUX_INV;
>> -		}
>> -		*cs++ = MI_NOOP;
>> +		if (rq->engine->class == VIDEO_DECODE_CLASS)
>> +			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
>> +		else
>> +			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);
>
> Not sure if, here and below, it would be worth to put register in a local and then have a single function call - up to you.

I feel it's easier to check the code correctness in the *_rcs/*_xcs functions and leave the helper function as simple as possible.

>
> Apart from the cs re-order looks good to me.

If no other problems with rev10, would you please help push it upstream? I don't have the commit right, will need to find someone to help take it further.

Thanks,
-Fei

> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-28 17:58     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-28 17:58 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx; +Cc: dri-devel, Wilson, Chris P

>> +u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>> -static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>
> I think all helpers which emit to ring take cs as the first argument so it would be good to make this consistent.

Updated the patch, please review rev10.
This helper function has been there for a long while, I was hesitant to change. But I agree cs should be the first argument. Since I removed the "static" anyway, so might just change the order all together.

>> @@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   	*cs++ = 0; /* value */
>>   
>>   	if (aux_inv) { /* hsdes: 1809175790 */
>> -		struct intel_engine_cs *engine;
>> -		unsigned int tmp;
>> -
>> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
>> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
>> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
>> -			*cs++ = AUX_INV;
>> -		}
>> -		*cs++ = MI_NOOP;
>> +		if (rq->engine->class == VIDEO_DECODE_CLASS)
>> +			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
>> +		else
>> +			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);
>
> Not sure if, here and below, it would be worth to put register in a local and then have a single function call - up to you.

I feel it's easier to check the code correctness in the *_rcs/*_xcs functions and leave the helper function as simple as possible.

>
> Apart from the cs re-order looks good to me.

If no other problems with rev10, would you please help push it upstream? I don't have the commit right, will need to find someone to help take it further.

Thanks,
-Fei

> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-28 17:16 fei.yang
  2022-03-29  7:51 ` Tvrtko Ursulin
  0 siblings, 1 reply; 35+ messages in thread
From: fei.yang @ 2022-03-28 17:16 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With the MMIO remap feature, we can actually set bit 17 of MI_LRI
instruction and let the hardware to figure out the local aux_inv
register at runtime to avoid invalidating auxiliary table for all
engines.

Bspec: 45728

v2: Invalidate AUX table for indirect context as well.

Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 50 +++++---------------
 drivers/gpu/drm/i915/gt/gen8_engine_cs.h     |  4 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 drivers/gpu/drm/i915/gt/intel_lrc.c          | 12 +++++
 4 files changed, 27 insertions(+), 40 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 36148887c699..047b5a710149 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -6,7 +6,6 @@
 #include "gen8_engine_cs.h"
 #include "i915_drv.h"
 #include "intel_gpu_commands.h"
-#include "intel_gt_regs.h"
 #include "intel_lrc.h"
 #include "intel_ring.h"
 
@@ -165,33 +164,9 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+u32 *gen12_emit_aux_table_inv(u32 *cs, const i915_reg_t inv_reg)
 {
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
-static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
-{
-	*cs++ = MI_LOAD_REGISTER_IMM(1);
+	*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
 	*cs++ = i915_mmio_reg_offset(inv_reg);
 	*cs++ = AUX_INV;
 	*cs++ = MI_NOOP;
@@ -274,7 +249,7 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 		if (!HAS_FLAT_CCS(rq->engine->i915)) {
 			/* hsdes: 1809175790 */
-			cs = gen12_emit_aux_table_inv(GEN12_GFX_CCS_AUX_NV, cs);
+			cs = gen12_emit_aux_table_inv(cs, GEN12_GFX_CCS_AUX_NV);
 		}
 
 		*cs++ = preparser_disable(false);
@@ -293,10 +268,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE) {
 		cmd += 2;
 
-		if (!HAS_FLAT_CCS(rq->engine->i915)) {
+		if (!HAS_FLAT_CCS(rq->engine->i915) &&
+		    (rq->engine->class == VIDEO_DECODE_CLASS ||
+		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
 			aux_inv = rq->engine->mask & ~BIT(BCS0);
 			if (aux_inv)
-				cmd += 2 * hweight32(aux_inv) + 2;
+				cmd += 4;
 		}
 	}
 
@@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
-		*cs++ = MI_NOOP;
+		if (rq->engine->class == VIDEO_DECODE_CLASS)
+			cs = gen12_emit_aux_table_inv(cs, GEN12_VD0_AUX_NV);
+		else
+			cs = gen12_emit_aux_table_inv(cs, GEN12_VE0_AUX_NV);
 	}
 
 	if (mode & EMIT_INVALIDATE)
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
index cc6e21d3662a..107ab42539ab 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
@@ -10,7 +10,7 @@
 #include <linux/types.h>
 
 #include "i915_gem.h" /* GEM_BUG_ON */
-
+#include "intel_gt_regs.h"
 #include "intel_gpu_commands.h"
 
 struct i915_request;
@@ -38,6 +38,8 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 
+u32 *gen12_emit_aux_table_inv(u32 *cs, const i915_reg_t inv_reg);
+
 static inline u32 *
 __gen8_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
 {
diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d112ffd56418..4243be030bc1 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -144,6 +144,7 @@
 #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
 /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
 #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
+#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
 #define   MI_LRI_FORCE_POSTED		(1<<12)
 #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
 #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 07bef7128fdb..dffef6ab4baf 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1208,6 +1208,10 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
 	    IS_DG2_G11(ce->engine->i915))
 		cs = gen8_emit_pipe_control(cs, PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);
 
+	/* hsdes: 1809175790 */
+	if (!HAS_FLAT_CCS(ce->engine->i915))
+		cs = gen12_emit_aux_table_inv(cs, GEN12_GFX_CCS_AUX_NV);
+
 	return cs;
 }
 
@@ -1225,6 +1229,14 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
 						    PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,
 						    0);
 
+	/* hsdes: 1809175790 */
+	if (!HAS_FLAT_CCS(ce->engine->i915)) {
+		if (ce->engine->class == VIDEO_DECODE_CLASS)
+			cs = gen12_emit_aux_table_inv(cs, GEN12_VD0_AUX_NV);
+		else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
+			cs = gen12_emit_aux_table_inv(cs, GEN12_VE0_AUX_NV);
+	}
+
 	return cs;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-28  3:16 fei.yang
@ 2022-03-28  8:37 ` Tvrtko Ursulin
  2022-03-28 17:58     ` Yang, Fei
  0 siblings, 1 reply; 35+ messages in thread
From: Tvrtko Ursulin @ 2022-03-28  8:37 UTC (permalink / raw)
  To: fei.yang, intel-gfx; +Cc: dri-devel, chris.p.wilson


On 28/03/2022 04:16, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With the MMIO remap feature, we can actually set bit 17 of MI_LRI
> instruction and let the hardware to figure out the local aux_inv
> register at runtime to avoid invalidating auxiliary table for all
> engines.
> 
> Bspec: 45728
> 
> v2: Invalidate AUX table for indirect context as well.
> 
> Cc: Stuart Summers <stuart.summers@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 48 ++++----------------
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.h     |  4 +-
>   drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
>   drivers/gpu/drm/i915/gt/intel_lrc.c          | 12 +++++
>   4 files changed, 26 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index 36148887c699..8178be083b42 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -6,7 +6,6 @@
>   #include "gen8_engine_cs.h"
>   #include "i915_drv.h"
>   #include "intel_gpu_commands.h"
> -#include "intel_gt_regs.h"
>   #include "intel_lrc.h"
>   #include "intel_ring.h"
>   
> @@ -165,33 +164,9 @@ static u32 preparser_disable(bool state)
>   	return MI_ARB_CHECK | 1 << 8 | state;
>   }
>   
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)

I think all helpers which emit to ring take cs as the first argument so 
it would be good to make this consistent.

>   {
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
> -static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
> -{
> -	*cs++ = MI_LOAD_REGISTER_IMM(1);
> +	*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
>   	*cs++ = i915_mmio_reg_offset(inv_reg);
>   	*cs++ = AUX_INV;
>   	*cs++ = MI_NOOP;
> @@ -293,10 +268,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	if (mode & EMIT_INVALIDATE) {
>   		cmd += 2;
>   
> -		if (!HAS_FLAT_CCS(rq->engine->i915)) {
> +		if (!HAS_FLAT_CCS(rq->engine->i915) &&
> +		    (rq->engine->class == VIDEO_DECODE_CLASS ||
> +		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>   			if (aux_inv)
> -				cmd += 2 * hweight32(aux_inv) + 2;
> +				cmd += 4;
>   		}
>   	}
>   
> @@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   
>   	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> -		*cs++ = MI_NOOP;
> +		if (rq->engine->class == VIDEO_DECODE_CLASS)
> +			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
> +		else
> +			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);

Not sure if, here and below, it would be worth to put register in a 
local and then have a single function call - up to you.

>   	}
>   
>   	if (mode & EMIT_INVALIDATE)
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> index cc6e21d3662a..94f589e73d10 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
> @@ -10,7 +10,7 @@
>   #include <linux/types.h>
>   
>   #include "i915_gem.h" /* GEM_BUG_ON */
> -
> +#include "intel_gt_regs.h"
>   #include "intel_gpu_commands.h"
>   
>   struct i915_request;
> @@ -38,6 +38,8 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
>   
> +u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs);
> +
>   static inline u32 *
>   __gen8_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
>   {
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index d112ffd56418..4243be030bc1 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -144,6 +144,7 @@
>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
> +#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
>   #define   MI_LRI_FORCE_POSTED		(1<<12)
>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 07bef7128fdb..7581ef9e2cce 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1208,6 +1208,10 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
>   	    IS_DG2_G11(ce->engine->i915))
>   		cs = gen8_emit_pipe_control(cs, PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);
>   
> +	/* hsdes: 1809175790 */
> +	if (!HAS_FLAT_CCS(ce->engine->i915))
> +		cs = gen12_emit_aux_table_inv(GEN12_GFX_CCS_AUX_NV, cs);
> +
>   	return cs;
>   }
>   
> @@ -1225,6 +1229,14 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
>   						    PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,
>   						    0);
>   
> +	/* hsdes: 1809175790 */
> +	if (!HAS_FLAT_CCS(ce->engine->i915)) {
> +		if (ce->engine->class == VIDEO_DECODE_CLASS)
> +			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
> +		else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
> +			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);
> +	}
> +
>   	return cs;
>   }
>   

Apart from the cs re-order looks good to me.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-28  3:16 fei.yang
  2022-03-28  8:37 ` Tvrtko Ursulin
  0 siblings, 1 reply; 35+ messages in thread
From: fei.yang @ 2022-03-28  3:16 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With the MMIO remap feature, we can actually set bit 17 of MI_LRI
instruction and let the hardware to figure out the local aux_inv
register at runtime to avoid invalidating auxiliary table for all
engines.

Bspec: 45728

v2: Invalidate AUX table for indirect context as well.

Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 48 ++++----------------
 drivers/gpu/drm/i915/gt/gen8_engine_cs.h     |  4 +-
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 drivers/gpu/drm/i915/gt/intel_lrc.c          | 12 +++++
 4 files changed, 26 insertions(+), 39 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 36148887c699..8178be083b42 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -6,7 +6,6 @@
 #include "gen8_engine_cs.h"
 #include "i915_drv.h"
 #include "intel_gpu_commands.h"
-#include "intel_gt_regs.h"
 #include "intel_lrc.h"
 #include "intel_ring.h"
 
@@ -165,33 +164,9 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
-static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
-{
-	*cs++ = MI_LOAD_REGISTER_IMM(1);
+	*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
 	*cs++ = i915_mmio_reg_offset(inv_reg);
 	*cs++ = AUX_INV;
 	*cs++ = MI_NOOP;
@@ -293,10 +268,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE) {
 		cmd += 2;
 
-		if (!HAS_FLAT_CCS(rq->engine->i915)) {
+		if (!HAS_FLAT_CCS(rq->engine->i915) &&
+		    (rq->engine->class == VIDEO_DECODE_CLASS ||
+		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
 			aux_inv = rq->engine->mask & ~BIT(BCS0);
 			if (aux_inv)
-				cmd += 2 * hweight32(aux_inv) + 2;
+				cmd += 4;
 		}
 	}
 
@@ -329,15 +306,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
-		*cs++ = MI_NOOP;
+		if (rq->engine->class == VIDEO_DECODE_CLASS)
+			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
+		else
+			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);
 	}
 
 	if (mode & EMIT_INVALIDATE)
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
index cc6e21d3662a..94f589e73d10 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.h
@@ -10,7 +10,7 @@
 #include <linux/types.h>
 
 #include "i915_gem.h" /* GEM_BUG_ON */
-
+#include "intel_gt_regs.h"
 #include "intel_gpu_commands.h"
 
 struct i915_request;
@@ -38,6 +38,8 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs);
 
+u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs);
+
 static inline u32 *
 __gen8_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)
 {
diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d112ffd56418..4243be030bc1 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -144,6 +144,7 @@
 #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
 /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
 #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
+#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
 #define   MI_LRI_FORCE_POSTED		(1<<12)
 #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
 #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 07bef7128fdb..7581ef9e2cce 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1208,6 +1208,10 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
 	    IS_DG2_G11(ce->engine->i915))
 		cs = gen8_emit_pipe_control(cs, PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE, 0);
 
+	/* hsdes: 1809175790 */
+	if (!HAS_FLAT_CCS(ce->engine->i915))
+		cs = gen12_emit_aux_table_inv(GEN12_GFX_CCS_AUX_NV, cs);
+
 	return cs;
 }
 
@@ -1225,6 +1229,14 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
 						    PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE,
 						    0);
 
+	/* hsdes: 1809175790 */
+	if (!HAS_FLAT_CCS(ce->engine->i915)) {
+		if (ce->engine->class == VIDEO_DECODE_CLASS)
+			cs = gen12_emit_aux_table_inv(GEN12_VD0_AUX_NV, cs);
+		else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
+			cs = gen12_emit_aux_table_inv(GEN12_VE0_AUX_NV, cs);
+	}
+
 	return cs;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-18 18:08 fei.yang
@ 2022-03-21 13:41 ` Tvrtko Ursulin
  0 siblings, 0 replies; 35+ messages in thread
From: Tvrtko Ursulin @ 2022-03-21 13:41 UTC (permalink / raw)
  To: fei.yang, intel-gfx; +Cc: dri-devel


On 18/03/2022 18:08, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With the MMIO remap feature, we can actually set bit 17 of MI_LRI
> instruction and let the hardware to figure out the local aux_inv
> register at runtime to avoid invalidating auxiliary table for all
> engines.
> 
> Bspec: 45728
> 
> Cc: Stuart Summers <stuart.summers@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 44 +++++---------------
>   drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
>   2 files changed, 11 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index 36148887c699..6e83ac06aaf6 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
>   	return MI_ARB_CHECK | 1 << 8 | state;
>   }
>   
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
>   static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>   {
>   	*cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -293,10 +269,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	if (mode & EMIT_INVALIDATE) {
>   		cmd += 2;
>   
> -		if (!HAS_FLAT_CCS(rq->engine->i915)) {
> +		if (!HAS_FLAT_CCS(rq->engine->i915) &&
> +		    (rq->engine->class == VIDEO_DECODE_CLASS ||
> +		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>   			if (aux_inv)
> -				cmd += 2 * hweight32(aux_inv) + 2;
> +				cmd += 4;
>   		}
>   	}
>   
> @@ -329,14 +307,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   
>   	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> -		}
> +		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
> +		if (rq->engine->class == VIDEO_DECODE_CLASS)
> +			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
> +		else
> +			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
> +		*cs++ = AUX_INV;
>   		*cs++ = MI_NOOP;
>   	}
>   
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index d112ffd56418..4243be030bc1 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -144,6 +144,7 @@
>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
> +#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
>   #define   MI_LRI_FORCE_POSTED		(1<<12)
>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)

LGTM.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Affects igpus from TGL onwards? If so:

Cc: stable@vger.kernel.org # v5.7+

?

Backporting might end up fun..

Regards,

Tvrtko

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-18 14:38 ` Tvrtko Ursulin
@ 2022-03-18 18:12     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-18 18:12 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx; +Cc: dri-devel

>>   static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>>   {
>>   	*cs++ = MI_LOAD_REGISTER_IMM(1);
>> @@ -296,7 +272,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   		if (!HAS_FLAT_CCS(rq->engine->i915)) {
>>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>>   			if (aux_inv)
>> -				cmd += 2 * hweight32(aux_inv) + 2;
>> +				cmd += 4;
>>   		}
>>   	}
>>   
>> @@ -329,14 +305,16 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   	*cs++ = 0; /* value */
>>   
>>   	if (aux_inv) { /* hsdes: 1809175790 */
>> -		struct intel_engine_cs *engine;
>> -		unsigned int tmp;
>> -
>> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
>> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
>> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
>> -			*cs++ = AUX_INV;
>> +		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
> 
> Cool, I didn't know this exists. First Bspec link I found did not mention these register, but second did.
> That one however (29545) has a worrying "removed by" tag which seems to point to a story suggesting the
> remapping table might be gone on machines with flat ccs?! Could you double check please?

The variable aux_inv is set only if (!HAS_FLAT_CCS(rq->engine->i915)).

>> +		if (rq->engine->class == VIDEO_DECODE_CLASS) {
>> +			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
>> +		} else if (rq->engine->class == VIDEO_ENHANCEMENT_CLASS) {
>> +			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
>> +		} else {
>> +			GEM_BUG_ON("unknown aux_inv reg\n");
>> +			*cs++ = i915_mmio_reg_offset(INVALID_MMIO_REG);
>
> I'd consider not emitting the LRI if we don't know what to put in unless there is some hidden point to do it?

That's true. I was following the original logic flow here. I think it would be better to check for engine class before setting the variable aux_inv.

>
>>   		}
>> +		*cs++ = AUX_INV;
>>   		*cs++ = MI_NOOP;
>>   	}
>>   
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h 
>> b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> index d112ffd56418..2d150eec5c65 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> @@ -144,6 +144,7 @@
>>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
>> +#define   MI_LRI_MMIO_REMAP_EN		(1 << 17)
>>   #define   MI_LRI_FORCE_POSTED		(1<<12)
>
> Passing observation - three bits, three flavours of expressing them, sigh...
Haha, REG_BIT(17) it is. The other one causes a CHECK:SPACING, but don't want to touch that in this patch.

>>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-18 18:12     ` Yang, Fei
  0 siblings, 0 replies; 35+ messages in thread
From: Yang, Fei @ 2022-03-18 18:12 UTC (permalink / raw)
  To: Tvrtko Ursulin, intel-gfx; +Cc: dri-devel

>>   static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>>   {
>>   	*cs++ = MI_LOAD_REGISTER_IMM(1);
>> @@ -296,7 +272,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   		if (!HAS_FLAT_CCS(rq->engine->i915)) {
>>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>>   			if (aux_inv)
>> -				cmd += 2 * hweight32(aux_inv) + 2;
>> +				cmd += 4;
>>   		}
>>   	}
>>   
>> @@ -329,14 +305,16 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>>   	*cs++ = 0; /* value */
>>   
>>   	if (aux_inv) { /* hsdes: 1809175790 */
>> -		struct intel_engine_cs *engine;
>> -		unsigned int tmp;
>> -
>> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
>> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
>> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
>> -			*cs++ = AUX_INV;
>> +		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
> 
> Cool, I didn't know this exists. First Bspec link I found did not mention these register, but second did.
> That one however (29545) has a worrying "removed by" tag which seems to point to a story suggesting the
> remapping table might be gone on machines with flat ccs?! Could you double check please?

The variable aux_inv is set only if (!HAS_FLAT_CCS(rq->engine->i915)).

>> +		if (rq->engine->class == VIDEO_DECODE_CLASS) {
>> +			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
>> +		} else if (rq->engine->class == VIDEO_ENHANCEMENT_CLASS) {
>> +			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
>> +		} else {
>> +			GEM_BUG_ON("unknown aux_inv reg\n");
>> +			*cs++ = i915_mmio_reg_offset(INVALID_MMIO_REG);
>
> I'd consider not emitting the LRI if we don't know what to put in unless there is some hidden point to do it?

That's true. I was following the original logic flow here. I think it would be better to check for engine class before setting the variable aux_inv.

>
>>   		}
>> +		*cs++ = AUX_INV;
>>   		*cs++ = MI_NOOP;
>>   	}
>>   
>> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h 
>> b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> index d112ffd56418..2d150eec5c65 100644
>> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
>> @@ -144,6 +144,7 @@
>>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
>> +#define   MI_LRI_MMIO_REMAP_EN		(1 << 17)
>>   #define   MI_LRI_FORCE_POSTED		(1<<12)
>
> Passing observation - three bits, three flavours of expressing them, sigh...
Haha, REG_BIT(17) it is. The other one causes a CHECK:SPACING, but don't want to touch that in this patch.

>>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-18 18:08 fei.yang
  2022-03-21 13:41 ` Tvrtko Ursulin
  0 siblings, 1 reply; 35+ messages in thread
From: fei.yang @ 2022-03-18 18:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With the MMIO remap feature, we can actually set bit 17 of MI_LRI
instruction and let the hardware to figure out the local aux_inv
register at runtime to avoid invalidating auxiliary table for all
engines.

Bspec: 45728

Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 44 +++++---------------
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 2 files changed, 11 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 36148887c699..6e83ac06aaf6 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -293,10 +269,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE) {
 		cmd += 2;
 
-		if (!HAS_FLAT_CCS(rq->engine->i915)) {
+		if (!HAS_FLAT_CCS(rq->engine->i915) &&
+		    (rq->engine->class == VIDEO_DECODE_CLASS ||
+		     rq->engine->class == VIDEO_ENHANCEMENT_CLASS)) {
 			aux_inv = rq->engine->mask & ~BIT(BCS0);
 			if (aux_inv)
-				cmd += 2 * hweight32(aux_inv) + 2;
+				cmd += 4;
 		}
 	}
 
@@ -329,14 +307,12 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
+		if (rq->engine->class == VIDEO_DECODE_CLASS)
+			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
+		else
+			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
 	}
 
diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d112ffd56418..4243be030bc1 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -144,6 +144,7 @@
 #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
 /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
 #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
+#define   MI_LRI_MMIO_REMAP_EN		REG_BIT(17)
 #define   MI_LRI_FORCE_POSTED		(1<<12)
 #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
 #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-18  5:26 fei.yang
@ 2022-03-18 14:38 ` Tvrtko Ursulin
  2022-03-18 18:12     ` Yang, Fei
  0 siblings, 1 reply; 35+ messages in thread
From: Tvrtko Ursulin @ 2022-03-18 14:38 UTC (permalink / raw)
  To: fei.yang, intel-gfx; +Cc: dri-devel


On 18/03/2022 05:26, fei.yang@intel.com wrote:
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With the MMIO remap feature, we can actually set bit 17 of MI_LRI
> instruction and let the hardware to figure out the local aux_inv
> register at runtime to avoid invalidating auxiliary table for all
> engines.
> 
> Bspec: 45728
> 
> Cc: Stuart Summers <stuart.summers@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 42 +++++---------------
>   drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
>   2 files changed, 11 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index 36148887c699..d440c5dfb6b7 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
>   	return MI_ARB_CHECK | 1 << 8 | state;
>   }
>   
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -	static const i915_reg_t vd[] = {
> -		GEN12_VD0_AUX_NV,
> -		GEN12_VD1_AUX_NV,
> -		GEN12_VD2_AUX_NV,
> -		GEN12_VD3_AUX_NV,
> -	};
> -
> -	static const i915_reg_t ve[] = {
> -		GEN12_VE0_AUX_NV,
> -		GEN12_VE1_AUX_NV,
> -	};
> -
> -	if (engine->class == VIDEO_DECODE_CLASS)
> -		return vd[engine->instance];
> -
> -	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -		return ve[engine->instance];
> -
> -	GEM_BUG_ON("unknown aux_inv reg\n");
> -	return INVALID_MMIO_REG;
> -}
> -
>   static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>   {
>   	*cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -296,7 +272,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   		if (!HAS_FLAT_CCS(rq->engine->i915)) {
>   			aux_inv = rq->engine->mask & ~BIT(BCS0);
>   			if (aux_inv)
> -				cmd += 2 * hweight32(aux_inv) + 2;
> +				cmd += 4;
>   		}
>   	}
>   
> @@ -329,14 +305,16 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>   	*cs++ = 0; /* value */
>   
>   	if (aux_inv) { /* hsdes: 1809175790 */
> -		struct intel_engine_cs *engine;
> -		unsigned int tmp;
> -
> -		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -			*cs++ = AUX_INV;
> +		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;

Cool, I didn't know this exists. First Bspec link I found did not 
mention these register, but second did. That one however (29545) has a 
worrying "removed by" tag which seems to point to a story suggesting the 
remapping table might be gone on machines with flat ccs?! Could you 
double check please?

> +		if (rq->engine->class == VIDEO_DECODE_CLASS) {
> +			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
> +		} else if (rq->engine->class == VIDEO_ENHANCEMENT_CLASS) {
> +			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
> +		} else {
> +			GEM_BUG_ON("unknown aux_inv reg\n");
> +			*cs++ = i915_mmio_reg_offset(INVALID_MMIO_REG);

I'd consider not emitting the LRI if we don't know what to put in unless 
there is some hidden point to do it?

>   		}
> +		*cs++ = AUX_INV;
>   		*cs++ = MI_NOOP;
>   	}
>   
> diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> index d112ffd56418..2d150eec5c65 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
> @@ -144,6 +144,7 @@
>   #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
>   /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
>   #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
> +#define   MI_LRI_MMIO_REMAP_EN		(1 << 17)
>   #define   MI_LRI_FORCE_POSTED		(1<<12)

Passing observation - three bits, three flavours of expressing them, sigh...

Regards,

Tvrtko

>   #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
>   #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-18  5:26 fei.yang
  2022-03-18 14:38 ` Tvrtko Ursulin
  0 siblings, 1 reply; 35+ messages in thread
From: fei.yang @ 2022-03-18  5:26 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With the MMIO remap feature, we can actually set bit 17 of MI_LRI
instruction and let the hardware to figure out the local aux_inv
register at runtime to avoid invalidating auxiliary table for all
engines.

Bspec: 45728

Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 42 +++++---------------
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 2 files changed, 11 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 36148887c699..d440c5dfb6b7 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -296,7 +272,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 		if (!HAS_FLAT_CCS(rq->engine->i915)) {
 			aux_inv = rq->engine->mask & ~BIT(BCS0);
 			if (aux_inv)
-				cmd += 2 * hweight32(aux_inv) + 2;
+				cmd += 4;
 		}
 	}
 
@@ -329,14 +305,16 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
+		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
+		if (rq->engine->class == VIDEO_DECODE_CLASS) {
+			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
+		} else if (rq->engine->class == VIDEO_ENHANCEMENT_CLASS) {
+			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
+		} else {
+			GEM_BUG_ON("unknown aux_inv reg\n");
+			*cs++ = i915_mmio_reg_offset(INVALID_MMIO_REG);
 		}
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
 	}
 
diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d112ffd56418..2d150eec5c65 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -144,6 +144,7 @@
 #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
 /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
 #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
+#define   MI_LRI_MMIO_REMAP_EN		(1 << 17)
 #define   MI_LRI_FORCE_POSTED		(1<<12)
 #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
 #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-18  5:12 fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-03-18  5:12 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With the MMIO remap feature, we can actually set bit 17 of MI_LRI
instruction and let the hardware to figure out the local aux_inv
register at runtime to avoid invalidating auxiliary table for all
engines.

Bspec: 45728

Cc: Stuart Summers <stuart.summers@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c     | 42 +++++---------------
 drivers/gpu/drm/i915/gt/intel_gpu_commands.h |  1 +
 2 files changed, 11 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 36148887c699..af5daaf934b5 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -296,7 +272,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 		if (!HAS_FLAT_CCS(rq->engine->i915)) {
 			aux_inv = rq->engine->mask & ~BIT(BCS0);
 			if (aux_inv)
-				cmd += 2 * hweight32(aux_inv) + 2;
+				cmd += 4;
 		}
 	}
 
@@ -329,14 +305,16 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
+		*cs++ = MI_LOAD_REGISTER_IMM(1) | MI_LRI_MMIO_REMAP_EN;
+		if (rq->engine->class == VIDEO_DECODE_CLASS)
+			*cs++ = i915_mmio_reg_offset(GEN12_VD0_AUX_NV);
+		else if (rq->engine->class == VIDEO_ENHANCEMENT_CLASS)
+			*cs++ = i915_mmio_reg_offset(GEN12_VE0_AUX_NV);
+		else {
+			GEM_BUG_ON("unknown aux_inv reg\n");
+			*cs++ = i915_mmio_reg_offset(INVALID_MMIO_REG);
 		}
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
 	}
 
diff --git a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
index d112ffd56418..54fdf1882cae 100644
--- a/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
+++ b/drivers/gpu/drm/i915/gt/intel_gpu_commands.h
@@ -144,6 +144,7 @@
 #define MI_LOAD_REGISTER_IMM(x)	MI_INSTR(0x22, 2*(x)-1)
 /* Gen11+. addr = base + (ctx_restore ? offset & GENMASK(12,2) : offset) */
 #define   MI_LRI_LRM_CS_MMIO		REG_BIT(19)
+#define   MI_LRI_MMIO_REMAP_EN		(1<<17)
 #define   MI_LRI_FORCE_POSTED		(1<<12)
 #define MI_LOAD_REGISTER_IMM_MAX_REGS (126)
 #define MI_STORE_REGISTER_MEM        MI_INSTR(0x24, 1)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-04 22:04 fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-03-04 22:04 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: chris.p.wilson

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the
engine executing the request. And the mmio address for the aux_inv
register is set after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen2_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen6_engine_cs.c      |  9 +++
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 61 ++++++++-----------
 .../drm/i915/gt/intel_execlists_submission.c  | 35 +++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 5 files changed, 82 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
index 1c82caf525c3..0ec4986e4805 100644
--- a/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen2_engine_cs.c
@@ -37,6 +37,9 @@ int gen2_emit_flush(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen2 */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -123,6 +126,9 @@ int gen4_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -138,6 +144,9 @@ int gen4_emit_flush_vcs(struct i915_request *rq, u32 mode)
 	*cs++ = MI_NOOP;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen4 vcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
index 5e65550b4dfb..aceb571c8212 100644
--- a/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen6_engine_cs.c
@@ -137,6 +137,9 @@ int gen6_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+        rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -208,6 +211,9 @@ static int mi_flush_dw(struct i915_request *rq, u32 flags)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen6 */
+        rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -347,6 +353,9 @@ int gen7_emit_flush_rcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0;
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen7 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index b1b9c3fd7bf9..b6374cf53314 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -73,6 +73,9 @@ int gen8_emit_flush_rcs(struct i915_request *rq, u32 mode)
 
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -106,6 +109,9 @@ int gen8_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 	intel_ring_advance(rq, cs);
 
+	/* hsdes: 1809175790. No fixup needed for gen8 xcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -157,6 +163,9 @@ int gen11_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. No fixup needed for gen11 rcs */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -165,30 +174,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -274,6 +259,9 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
 		intel_ring_advance(rq, cs);
 	}
 
+	/* hsdes: 1809175790. aux_inv has been done above, no fixup needed */
+	rq->aux_inv_fixup = NULL;
+
 	return 0;
 }
 
@@ -288,7 +276,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -319,16 +307,21 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		/*
+		 * We don't know which engine will eventually carry out
+		 * this request, so the mmio aux_inv register address is
+		 * unknown at this moment. We save the cs pointer supposed
+		 * to hold the aux_inv address in rq->aux_inv_fixup and set
+		 * it in execlists_dequeue() when the engine instance
+		 * carrying out this request becomes certain
+		 */
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->aux_inv_fixup = cs; /* save the pointer to aux_inv */
+		*cs++ = 0; /* mmio addr to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
-	}
+	} else
+		rq->aux_inv_fixup = NULL;
 
 	if (mode & EMIT_INVALIDATE)
 		*cs++ = preparser_disable(false);
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index e1470bb60f34..7e8552414275 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1538,6 +1566,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if (rq->aux_inv_fixup) {
+					*rq->aux_inv_fixup =
+						i915_mmio_reg_offset
+							(aux_inv_reg(engine));
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..8e0764c43936 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -312,6 +312,8 @@ struct i915_request {
 	struct i915_capture_list *capture_list;
 #endif
 
+	u32 *aux_inv_fixup; /* hsdes: 1809175790 */
+
 	/** Time at which this request was emitted, in jiffies. */
 	unsigned long emitted_jiffies;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
  2022-03-02 18:26 fei.yang
@ 2022-03-02 20:50 ` Chris Wilson
  0 siblings, 0 replies; 35+ messages in thread
From: Chris Wilson @ 2022-03-02 20:50 UTC (permalink / raw)
  To: dri-devel, fei.yang, intel-gfx

Quoting fei.yang@intel.com (2022-03-02 18:26:57)
> From: Fei Yang <fei.yang@intel.com>
> 
> GPU hangs have been observed when multiple engines write to the
> same aux_inv register at the same time. To avoid this each engine
> should only invalidate its own auxiliary table. The function
> gen12_emit_flush_xcs() currently invalidate the auxiliary table for
> all engines because the rq->engine is not necessarily the engine
> eventually carrying out the request, and potentially the engine
> could even be a virtual one (with engine->instance being -1).
> With this patch, auxiliary table invalidation is done only for the
> engine executing the request. And the mmio address for the aux_inv
> register is set after the engine instance becomes certain.
> 
> Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
> Signed-off-by: Fei Yang <fei.yang@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 41 ++++---------------
>  .../drm/i915/gt/intel_execlists_submission.c  | 38 +++++++++++++++++
>  drivers/gpu/drm/i915/i915_request.h           |  2 +
>  3 files changed, 47 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index b1b9c3fd7bf9..af62e2bc2c9b 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
>         return MI_ARB_CHECK | 1 << 8 | state;
>  }
>  
> -static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> -{
> -       static const i915_reg_t vd[] = {
> -               GEN12_VD0_AUX_NV,
> -               GEN12_VD1_AUX_NV,
> -               GEN12_VD2_AUX_NV,
> -               GEN12_VD3_AUX_NV,
> -       };
> -
> -       static const i915_reg_t ve[] = {
> -               GEN12_VE0_AUX_NV,
> -               GEN12_VE1_AUX_NV,
> -       };
> -
> -       if (engine->class == VIDEO_DECODE_CLASS)
> -               return vd[engine->instance];
> -
> -       if (engine->class == VIDEO_ENHANCEMENT_CLASS)
> -               return ve[engine->instance];
> -
> -       GEM_BUG_ON("unknown aux_inv reg\n");
> -       return INVALID_MMIO_REG;
> -}
> -
>  static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
>  {
>         *cs++ = MI_LOAD_REGISTER_IMM(1);
> @@ -288,7 +264,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>         if (mode & EMIT_INVALIDATE)
>                 aux_inv = rq->engine->mask & ~BIT(BCS0);
>         if (aux_inv)
> -               cmd += 2 * hweight32(aux_inv) + 2;
> +               cmd += 4;
>  
>         cs = intel_ring_begin(rq, cmd);
>         if (IS_ERR(cs))
> @@ -319,16 +295,13 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
>         *cs++ = 0; /* value */
>  
>         if (aux_inv) { /* hsdes: 1809175790 */
> -               struct intel_engine_cs *engine;
> -               unsigned int tmp;
> -
> -               *cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
> -               for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
> -                       *cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
> -                       *cs++ = AUX_INV;
> -               }
> +               *cs++ = MI_LOAD_REGISTER_IMM(1);
> +               rq->vd_ve_aux_inv = cs;
> +               *cs++ = 0; /* address to be set at submission to HW */
> +               *cs++ = AUX_INV;
>                 *cs++ = MI_NOOP;
> -       }
> +       } else
> +               rq->vd_ve_aux_inv = NULL;
>  
>         if (mode & EMIT_INVALIDATE)
>                 *cs++ = preparser_disable(false);
> diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> index 1c602d4ae297..a018de6dcac5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
> @@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
>         return __i915_request_is_complete(rq);
>  }
>  
> +static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
> +{
> +       static const i915_reg_t vd[] = {
> +               GEN12_VD0_AUX_NV,
> +               GEN12_VD1_AUX_NV,
> +               GEN12_VD2_AUX_NV,
> +               GEN12_VD3_AUX_NV,
> +       };
> +
> +       static const i915_reg_t ve[] = {
> +               GEN12_VE0_AUX_NV,
> +               GEN12_VE1_AUX_NV,
> +       };
> +
> +       if (engine->class == VIDEO_DECODE_CLASS) {
> +               GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
> +               return vd[engine->instance];
> +       }
> +
> +       if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
> +               GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
> +               return ve[engine->instance];
> +       }
> +
> +       GEM_BUG_ON("unknown aux_inv reg\n");
> +       return INVALID_MMIO_REG;
> +}
> +
>  static void execlists_dequeue(struct intel_engine_cs *engine)
>  {
>         struct intel_engine_execlists * const execlists = &engine->execlists;
> @@ -1538,6 +1566,16 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>                         }
>  
>                         if (__i915_request_submit(rq)) {
> +                               /* hsdes: 1809175790 */
> +                               if ((GRAPHICS_VER(engine->i915) == 12) &&
> +                                   rq->vd_ve_aux_inv &&
> +                                   (engine->class == VIDEO_DECODE_CLASS ||
> +                                    engine->class == VIDEO_ENHANCEMENT_CLASS)) {

We do not need the extra checks here; we just do as we are told. We only
tell ourselves to apply the fixup when required.

> +                                       *rq->vd_ve_aux_inv = i915_mmio_reg_offset

Likewise, vd_ve is overspecific, aux_inv_fixup or aux_inv_wa (or
wa_aux_iv, fixup_aux_inv).

> +                                               (aux_inv_reg(engine));
> +                                       rq->vd_ve_aux_inv = NULL;

Move this to i915_request initialisation so that we only set aux_inv
when required, which probably explains the extra defence.

> +                                       rq->execution_mask = engine->mask;
> +                               }
>                                 if (!merge) {
>                                         *port++ = i915_request_get(last);
>                                         last = NULL;
> diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
> index 28b1f9db5487..69de32e5e15d 100644
> --- a/drivers/gpu/drm/i915/i915_request.h
> +++ b/drivers/gpu/drm/i915/i915_request.h
> @@ -350,6 +350,8 @@ struct i915_request {
>                 struct list_head link;
>                 unsigned long delay;
>         } mock;)
> +
> +       u32 *vd_ve_aux_inv;

Not at the end of the struct; that's where we put things in the dungeon.
The selftest struct should be last; I do hope no one has been putting
things at random places in the struct without considering the layout and
semantics. From the flow, this is akin to batch, capture_list; before
emitted_jiffies would be a good spot.
-Chris

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-03-02 18:26 fei.yang
  2022-03-02 20:50 ` Chris Wilson
  0 siblings, 1 reply; 35+ messages in thread
From: fei.yang @ 2022-03-02 18:26 UTC (permalink / raw)
  To: intel-gfx, dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the
same aux_inv register at the same time. To avoid this each engine
should only invalidate its own auxiliary table. The function
gen12_emit_flush_xcs() currently invalidate the auxiliary table for
all engines because the rq->engine is not necessarily the engine
eventually carrying out the request, and potentially the engine
could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the
engine executing the request. And the mmio address for the aux_inv
register is set after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 41 ++++---------------
 .../drm/i915/gt/intel_execlists_submission.c  | 38 +++++++++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 3 files changed, 47 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index b1b9c3fd7bf9..af62e2bc2c9b 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -288,7 +264,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -319,16 +295,13 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->vd_ve_aux_inv = cs;
+		*cs++ = 0; /* address to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
-	}
+	} else
+		rq->vd_ve_aux_inv = NULL;
 
 	if (mode & EMIT_INVALIDATE)
 		*cs++ = preparser_disable(false);
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 1c602d4ae297..a018de6dcac5 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1258,6 +1258,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1538,6 +1566,16 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if ((GRAPHICS_VER(engine->i915) == 12) &&
+				    rq->vd_ve_aux_inv &&
+				    (engine->class == VIDEO_DECODE_CLASS ||
+				     engine->class == VIDEO_ENHANCEMENT_CLASS)) {
+					*rq->vd_ve_aux_inv = i915_mmio_reg_offset
+						(aux_inv_reg(engine));
+					rq->vd_ve_aux_inv = NULL;
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..69de32e5e15d 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -350,6 +350,8 @@ struct i915_request {
 		struct list_head link;
 		unsigned long delay;
 	} mock;)
+
+	u32 *vd_ve_aux_inv;
 };
 
 #define I915_FENCE_GFP (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-02-26  7:11 fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-02-26  7:11 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the same aux_inv
register at the same time. To avoid this each engine should only invalidate
its own auxiliary table. The function gen12_emit_flush_xcs() currently
invalidate the auxiliary table for all engines because the rq->engine is not
necessarily the engine eventually carrying out the request, and potentially
the engine could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the engine
executing the request. And the mmio address for the aux_inv register is set
after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 38 +++----------------
 .../drm/i915/gt/intel_execlists_submission.c  | 38 +++++++++++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 3 files changed, 45 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 1f8cf4f790b2..9e39d04f46cc 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -280,7 +256,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -311,14 +287,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->vd_ve_aux_inv = cs;
+		*cs++ = 0; /* address to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
 	}
 
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 961d795220a3..be4954ba4e43 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1253,6 +1253,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1533,6 +1561,16 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if ((GRAPHICS_VER(engine->i915) == 12) &&
+				    rq->vd_ve_aux_inv &&
+				    (engine->class == VIDEO_DECODE_CLASS ||
+				     engine->class == VIDEO_ENHANCEMENT_CLASS)) {
+					*rq->vd_ve_aux_inv = i915_mmio_reg_offset
+						(aux_inv_reg(engine));
+					rq->vd_ve_aux_inv = NULL;
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..69de32e5e15d 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -350,6 +350,8 @@ struct i915_request {
 		struct list_head link;
 		unsigned long delay;
 	} mock;)
+
+	u32 *vd_ve_aux_inv;
 };
 
 #define I915_FENCE_GFP (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: avoid concurrent writes to aux_inv
@ 2022-02-26  1:50 fei.yang
  0 siblings, 0 replies; 35+ messages in thread
From: fei.yang @ 2022-02-26  1:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: chris.p.wilson, dri-devel

From: Fei Yang <fei.yang@intel.com>

GPU hangs have been observed when multiple engines write to the same aux_inv
register at the same time. To avoid this each engine should only invalidate
its own auxiliary table. The function gen12_emit_flush_xcs() currently
invalidate the auxiliary table for all engines because the rq->engine is not
necessarily the engine eventually carrying out the request, and potentially
the engine could even be a virtual one (with engine->instance being -1).
With this patch, auxiliary table invalidation is done only for the engine
executing the request. And the mmio address for the aux_inv register is set
after the engine instance becomes certain.

Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Fei Yang <fei.yang@intel.com>
---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 38 +++----------------
 .../drm/i915/gt/intel_execlists_submission.c  | 38 +++++++++++++++++++
 drivers/gpu/drm/i915/i915_request.h           |  2 +
 3 files changed, 45 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 1f8cf4f790b2..9e39d04f46cc 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -165,30 +165,6 @@ static u32 preparser_disable(bool state)
 	return MI_ARB_CHECK | 1 << 8 | state;
 }
 
-static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
-{
-	static const i915_reg_t vd[] = {
-		GEN12_VD0_AUX_NV,
-		GEN12_VD1_AUX_NV,
-		GEN12_VD2_AUX_NV,
-		GEN12_VD3_AUX_NV,
-	};
-
-	static const i915_reg_t ve[] = {
-		GEN12_VE0_AUX_NV,
-		GEN12_VE1_AUX_NV,
-	};
-
-	if (engine->class == VIDEO_DECODE_CLASS)
-		return vd[engine->instance];
-
-	if (engine->class == VIDEO_ENHANCEMENT_CLASS)
-		return ve[engine->instance];
-
-	GEM_BUG_ON("unknown aux_inv reg\n");
-	return INVALID_MMIO_REG;
-}
-
 static u32 *gen12_emit_aux_table_inv(const i915_reg_t inv_reg, u32 *cs)
 {
 	*cs++ = MI_LOAD_REGISTER_IMM(1);
@@ -280,7 +256,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (mode & EMIT_INVALIDATE)
 		aux_inv = rq->engine->mask & ~BIT(BCS0);
 	if (aux_inv)
-		cmd += 2 * hweight32(aux_inv) + 2;
+		cmd += 4;
 
 	cs = intel_ring_begin(rq, cmd);
 	if (IS_ERR(cs))
@@ -311,14 +287,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* value */
 
 	if (aux_inv) { /* hsdes: 1809175790 */
-		struct intel_engine_cs *engine;
-		unsigned int tmp;
-
-		*cs++ = MI_LOAD_REGISTER_IMM(hweight32(aux_inv));
-		for_each_engine_masked(engine, rq->engine->gt, aux_inv, tmp) {
-			*cs++ = i915_mmio_reg_offset(aux_inv_reg(engine));
-			*cs++ = AUX_INV;
-		}
+		*cs++ = MI_LOAD_REGISTER_IMM(1);
+		rq->vd_ve_aux_inv = cs;
+		*cs++ = 0; /* address to be set at submission to HW */
+		*cs++ = AUX_INV;
 		*cs++ = MI_NOOP;
 	}
 
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 961d795220a3..f56726c861b7 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -1253,6 +1253,34 @@ static bool completed(const struct i915_request *rq)
 	return __i915_request_is_complete(rq);
 }
 
+static i915_reg_t aux_inv_reg(const struct intel_engine_cs *engine)
+{
+	static const i915_reg_t vd[] = {
+		GEN12_VD0_AUX_NV,
+		GEN12_VD1_AUX_NV,
+		GEN12_VD2_AUX_NV,
+		GEN12_VD3_AUX_NV,
+	};
+
+	static const i915_reg_t ve[] = {
+		GEN12_VE0_AUX_NV,
+		GEN12_VE1_AUX_NV,
+	};
+
+	if (engine->class == VIDEO_DECODE_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(vd));
+		return vd[engine->instance];
+	}
+
+	if (engine->class == VIDEO_ENHANCEMENT_CLASS) {
+		GEM_BUG_ON(engine->instance >= ARRAY_SIZE(ve));
+		return ve[engine->instance];
+	}
+
+	GEM_BUG_ON("unknown aux_inv reg\n");
+	return INVALID_MMIO_REG;
+}
+
 static void execlists_dequeue(struct intel_engine_cs *engine)
 {
 	struct intel_engine_execlists * const execlists = &engine->execlists;
@@ -1533,6 +1561,16 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 			}
 
 			if (__i915_request_submit(rq)) {
+				/* hsdes: 1809175790 */
+				if (rq->vd_ve_aux_inv &&
+				    (engine->class == VIDEO_DECODE_CLASS ||
+				     engine->class == VIDEO_ENHANCEMENT_CLASS)) {
+					*rq->vd_ve_aux_inv =
+						i915_mmio_reg_offset(
+							aux_inv_reg(engine));
+					rq->vd_ve_aux_inv = NULL;
+					rq->execution_mask = engine->mask;
+				}
 				if (!merge) {
 					*port++ = i915_request_get(last);
 					last = NULL;
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 28b1f9db5487..69de32e5e15d 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -350,6 +350,8 @@ struct i915_request {
 		struct list_head link;
 		unsigned long delay;
 	} mock;)
+
+	u32 *vd_ve_aux_inv;
 };
 
 #define I915_FENCE_GFP (GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2022-03-29  7:51 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 22:14 [PATCH] drm/i915: avoid concurrent writes to aux_inv fei.yang
2022-03-04 22:14 ` [Intel-gfx] " fei.yang
2022-03-04 22:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: avoid concurrent writes to aux_inv (rev5) Patchwork
2022-03-04 22:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-03-04 23:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-05  9:36 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-03-16  3:22   ` Summers, Stuart
2022-03-16  5:58     ` Yang, Fei
2022-03-16  4:43 ` [PATCH] drm/i915: avoid concurrent writes to aux_inv Summers, Stuart
2022-03-16  4:43   ` [Intel-gfx] " Summers, Stuart
2022-03-16  5:54   ` Yang, Fei
2022-03-16  5:54     ` [Intel-gfx] " Yang, Fei
2022-03-16  7:19     ` Yang, Fei
2022-03-16  7:19       ` [Intel-gfx] " Yang, Fei
2022-03-16 10:03 ` Tvrtko Ursulin
2022-03-16 18:25   ` Yang, Fei
2022-03-16 18:25     ` Yang, Fei
  -- strict thread matches above, loose matches on Subject: below --
2022-03-28 17:16 fei.yang
2022-03-29  7:51 ` Tvrtko Ursulin
2022-03-28  3:16 fei.yang
2022-03-28  8:37 ` Tvrtko Ursulin
2022-03-28 17:58   ` Yang, Fei
2022-03-28 17:58     ` Yang, Fei
2022-03-18 18:08 fei.yang
2022-03-21 13:41 ` Tvrtko Ursulin
2022-03-18  5:26 fei.yang
2022-03-18 14:38 ` Tvrtko Ursulin
2022-03-18 18:12   ` Yang, Fei
2022-03-18 18:12     ` Yang, Fei
2022-03-18  5:12 fei.yang
2022-03-04 22:04 fei.yang
2022-03-02 18:26 fei.yang
2022-03-02 20:50 ` Chris Wilson
2022-02-26  7:11 fei.yang
2022-02-26  1:50 fei.yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.