From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAF0910E3DB for ; Tue, 18 Jan 2022 01:54:11 +0000 (UTC) Date: Mon, 17 Jan 2022 17:54:10 -0800 Message-ID: <87fspln70d.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20220117085700.1723228-3-priyanka.dandamudi@intel.com> References: <20220117085700.1723228-1-priyanka.dandamudi@intel.com> <20220117085700.1723228-3-priyanka.dandamudi@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t v3 2/2] tests/i915/gem_ctx_exec: Skip test for shared reset domain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: priyanka.dandamudi@intel.com Cc: igt-dev@lists.freedesktop.org, saurabhg.gupta@intel.com List-ID: On Mon, 17 Jan 2022 00:57:00 -0800, wrote: > > @@ -292,11 +293,15 @@ static void nohangcheck_hostile(int i915) > ahnd = get_reloc_ahnd(i915, ctx->id); > > igt_require(__enable_hangcheck(dir, false)); > + has_sh_do = has_shared_reset_domain(i915, ctx); > > for_each_ctx_engine(i915, ctx, e) { > igt_spin_t *spin; > int new; > > + if (has_sh_do && (e->class == I915_ENGINE_CLASS_RENDER || > + e->class == I915_ENGINE_CLASS_COMPUTE)) > + continue; If we need to do this, let's not try to overly optimize things (which will clutter up the code since has_shared_reset_domain() may get called from multiple places) and just pass the engine into the function, something like: bool has_shared_reset_domain(int fd, struct intel_execution_engine2 *e2, const intel_ctx_t *ctx) { const struct intel_execution_engine2 *e; int count = 0; if (!(e2->class == I915_ENGINE_CLASS_RENDER || e2->class == I915_ENGINE_CLASS_COMPUTE)) return false; for_each_ctx_engine(fd, ctx, e) if (e->class == I915_ENGINE_CLASS_RENDER || e->class == I915_ENGINE_CLASS_COMPUTE) count++; return count >= 2; } And then in the loop above just have: if (has_shared_reset_domain(fd, e, ctx)) continue; Also, I may be wrong, but it looks to me that this test should pass even if we have shared resets, the test is not even using engine resets. What failure are we seeing and on which platforms and with how many gt's? Does the test fail only on DG2 or also on other products with RCS + CCS? Can you paste the output after running the failing test? Any idea anyone why this test would fail with a shared reset domain? Could it be failing due to a different reason than a shared reset domain as people pointed out on previous versions of the patch? In that case this patch is incorrect.