[PATCH I-G-T v5] tests/intel/i915_hangman: Fix spin engine hang

Mikolaj Wasiak mikolaj.wasiak at intel.com
Tue Dec 17 13:45:53 UTC 2024


On DG2 when RCS engine is active, the CCS engine freezes which leads to
hangman test failures.
This patch disables RCS and CCS background spins when testing any engine
on hangman.

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

diff --git a/tests/intel/i915_hangman.c b/tests/intel/i915_hangman.c
index a556eec53..6f1fdc788 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_rcs_ccs(const struct intel_execution_engine2 *e)
+{
+	return e->class == I915_ENGINE_CLASS_COMPUTE ||
+	       e->class == I915_ENGINE_CLASS_RENDER;
+}
+
 static void
 test_engine_hang(const intel_ctx_t *ctx,
 		 const struct intel_execution_engine2 *e, unsigned int flags)
@@ -388,6 +394,14 @@ test_engine_hang(const intel_ctx_t *ctx,
 	 */
 	num_ctx = 0;
 	for_each_ctx_engine(device, ctx, other) {
+		/* Due to Wa_14014494547:DG2 we can't run RCS and CCS
+		 * in parallel. We still want background spin of the
+		 * same type as hanged spin to be run.
+		 */
+		if (IS_DG2(intel_get_drm_devid(device)) && is_rcs_ccs(other) &&
+		    other->class != e->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.1



More information about the igt-dev mailing list