[PATCH i-g-t v2] tests/intel/i915_hangman: Fix spin engine hang
Krzysztof Karas
krzysztof.karas at intel.com
Thu Nov 28 09:33:22 UTC 2024
Hi Mikolaj,
> +static bool
> +is_bcs_ccs(const struct intel_execution_engine2 *e) {
> + return e->class == I915_ENGINE_CLASS_COMPUTE ||
> + e->class == I915_ENGINE_CLASS_COPY;
> +}
> +
I am wondering if this function could be useful in its current form in
other tests in the future. As it is now its only purpose is to let us
save a few lines of code (instead of writing e->class == ... || e->class
== ... we call this function). What if you moved the logic from lines:
> + is_bcs_ccs(e) &&
> + is_bcs_ccs(other) &&
> + e->class != other->class
into the function? It would then compare two engine classes and return
"true" only if they are COPY/COMPUTE and actually different. This would
change the purpose of the function (and likely its name as well), so
treat this as a suggestion.
Krzysztof
> @@ -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);
>
More information about the igt-dev
mailing list