[PATCH i-g-t] tests/intel/i915_hangman: Fix spin engine hang
Krzysztof Karas
krzysztof.karas at intel.com
Fri Nov 22 13:48:16 UTC 2024
Hi Mikołaj,
> +static bool
> +is_bcs_ccs(const struct intel_execution_engine2 *e) {
> + return I915_ENGINE_CLASS_COMPUTE == e->class ||
> + I915_ENGINE_CLASS_COPY == e->class;
I think you could swap these around: e->class ==
I915_ENGINE_CLASS_COMPUTE || e->class == I915_ENGINE_CLASS_COPY.
While logic remains the same, you'll show that you check e->class
for certain values, not other way around.
> +}
> +
> static void
> test_engine_hang(const intel_ctx_t *ctx,
> const struct intel_execution_engine2 *e, unsigned int flags)
> @@ -388,6 +394,12 @@ 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))
Does for_each_ctx_engine() "know" if e == other? If it just iterates
over all engines, then you'd also skip cases where both point to the
same engine (e == other == bcs0 and e == other == ccs0), so in result
nothing would be run in background on those.
Krzysztof
> + continue;
> +
More information about the igt-dev
mailing list