[igt-dev] [PATCH i-g-t 2/3] tests/intel/gem_ctx_shared: Skip some test on MTL

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Sep 14 13:50:17 UTC 2023


Hi Nirmoy,

On 2023-09-13 at 11:42:51 +0200, Nirmoy Das wrote:
> We do GGTT update on MTL using bcs engine, blocking that would
> will fail the test so skip such subtests on bcs engine for MTL.
> 
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
>  tests/intel/gem_ctx_shared.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/intel/gem_ctx_shared.c b/tests/intel/gem_ctx_shared.c
> index d24ae5483..bad032417 100644
> --- a/tests/intel/gem_ctx_shared.c
> +++ b/tests/intel/gem_ctx_shared.c
> @@ -1105,22 +1105,26 @@ igt_main
>  
>  			igt_subtest_with_dynamic("Q-independent") {
>  				for_each_queue(e, i915, &cfg)
> -					independent(i915, &cfg, e, 0);
> +					if (!(gem_has_ggtt_bind(i915) && e->class == I915_ENGINE_CLASS_COPY))
------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
imho it is better to make it a bool function (preferable) or macro
and use it like:
					if (can_use_engine(i915, e))

bool can_use_engine(int fd, engine *e)
{
    return !(e->class == I915_ENGINE_CLASS_COPY && gem_has_ggtt_bind(i915));
}

Same goes for your last patch, name of this function could be
better.

Regards,
Kamil

> +						independent(i915, &cfg, e, 0);
>  			}
>  
>  			igt_subtest_with_dynamic("Q-in-order") {
>  				for_each_queue(e, i915, &cfg)
> -					reorder(i915, &cfg, e->flags, EQUAL);
> +					if (!(gem_has_ggtt_bind(i915) && e->class == I915_ENGINE_CLASS_COPY))
> +						reorder(i915, &cfg, e->flags, EQUAL);
>  			}
>  
>  			igt_subtest_with_dynamic("Q-out-order") {
>  				for_each_queue(e, i915, &cfg)
> -					reorder(i915, &cfg, e->flags, 0);
> +					if (!(gem_has_ggtt_bind(i915) && e->class == I915_ENGINE_CLASS_COPY))
> +						reorder(i915, &cfg, e->flags, 0);
>  			}
>  
>  			igt_subtest_with_dynamic("Q-promotion") {
>  				for_each_queue(e, i915, &cfg)
> -					promotion(i915, &cfg, e->flags);
> +					if (!(gem_has_ggtt_bind(i915) && e->class == I915_ENGINE_CLASS_COPY))
> +						promotion(i915, &cfg, e->flags);
>  			}
>  		}
>  
> -- 
> 2.41.0
> 


More information about the igt-dev mailing list