Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2] tests/intel/i915_hangman: Fix spin engine hang
@ 2024-11-25  9:25 Mikolaj Wasiak
  2024-11-25 10:23 ` ✓ Xe.CI.BAT: success for tests/intel/i915_hangman: Fix spin engine hang (rev2) Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mikolaj Wasiak @ 2024-11-25  9:25 UTC (permalink / raw)
  To: igt-dev, chris.p.wilson; +Cc: krzysztof.karas, andi.shyti

Apply workaround when running background spins in hangman test.
Disable bcs0 background engine when testing ccs0 and vice-versa.

Signed-off-by: Mikolaj Wasiak <mikolaj.wasiak@intel.com>
---
 tests/intel/i915_hangman.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/intel/i915_hangman.c b/tests/intel/i915_hangman.c
index a556eec53..2948cebd7 100644
--- a/tests/intel/i915_hangman.c
+++ b/tests/intel/i915_hangman.c
@@ -365,6 +365,12 @@ static void chk_err(int *dst, int err, int expected)
 #define ERR_FENCE_END  3
 #define ERR_FENCE_STAT 4
 
+static bool
+is_bcs_ccs(const struct intel_execution_engine2 *e) {
+	return e->class == I915_ENGINE_CLASS_COMPUTE ||
+	       e->class == I915_ENGINE_CLASS_COPY;
+}
+
 static void
 test_engine_hang(const intel_ctx_t *ctx,
 		 const struct intel_execution_engine2 *e, unsigned int flags)
@@ -388,6 +394,13 @@ test_engine_hang(const intel_ctx_t *ctx,
 	 */
 	num_ctx = 0;
 	for_each_ctx_engine(device, ctx, other) {
+		/* Wa_14014494547:DG2 */
+		if (IS_DG2(intel_get_drm_devid(device)) &&
+		    is_bcs_ccs(e) &&
+		    is_bcs_ccs(other) &&
+		    e->class != other->class)
+			continue;
+
 		local_ctx[num_ctx] = intel_ctx_create(device, &ctx->cfg);
 		context_unban(device, local_ctx[num_ctx]->id);
 		ahndN = get_reloc_ahnd(device, local_ctx[num_ctx]->id);
-- 
2.47.0


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

end of thread, other threads:[~2024-11-28  9:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25  9:25 [PATCH i-g-t v2] tests/intel/i915_hangman: Fix spin engine hang Mikolaj Wasiak
2024-11-25 10:23 ` ✓ Xe.CI.BAT: success for tests/intel/i915_hangman: Fix spin engine hang (rev2) Patchwork
2024-11-25 10:37 ` ✓ i915.CI.BAT: " Patchwork
2024-11-25 12:02 ` ✗ Xe.CI.Full: failure " Patchwork
2024-11-25 12:04 ` ✗ i915.CI.Full: " Patchwork
2024-11-27 17:06 ` [PATCH i-g-t v2] tests/intel/i915_hangman: Fix spin engine hang Andi Shyti
2024-11-28  9:33 ` Krzysztof Karas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox