[igt-dev] [PATCH v23 14/14] test/i915: i915_hangman: use the gem_engine_topology library

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon May 13 11:49:14 UTC 2019


On 13/05/2019 01:45, Andi Shyti wrote:
> From: Andi Shyti <andi.shyti at intel.com>
> 
> Replace the legacy for_each_engine* defines with the ones
> implemented in the gem_engine_topology library.
> 
> Signed-off-by: Andi Shyti <andi.shyti at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   tests/i915/i915_hangman.c | 15 ++++-----------
>   1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
> index 9a1d58897ca1..bb5521e03dd3 100644
> --- a/tests/i915/i915_hangman.c
> +++ b/tests/i915/i915_hangman.c
> @@ -256,7 +256,7 @@ static void hangcheck_unterminated(void)
>   
>   igt_main
>   {
> -	const struct intel_execution_engine *e;
> +	const struct intel_execution_engine2 *e;
>   	igt_hang_t hang = {};
>   
>   	igt_skip_on_simulation();
> @@ -276,16 +276,9 @@ igt_main
>   	igt_subtest("error-state-basic")
>   		test_error_state_basic();
>   
> -	for (e = intel_execution_engines; e->name; e++) {
> -		if (e->exec_id == 0)
> -			continue;
> -
> -		igt_subtest_f("error-state-capture-%s", e->name) {
> -			igt_require(gem_ring_has_physical_engine(device, e->exec_id | e->flags));
> -			test_error_state_capture(e->exec_id | e->flags,
> -						 e->full_name);
> -		}
> -	}
> +	__for_each_physical_engine(device, e)
> +		igt_subtest_f("error-state-capture-%s", e->name)
> +			test_error_state_capture(e->flags, e->name);
>   
>   	igt_subtest("hangcheck-unterminated")
>   		hangcheck_unterminated();
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the igt-dev mailing list