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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon May 13 10:56:19 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: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   tests/i915/gem_exec_parallel.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_parallel.c b/tests/i915/gem_exec_parallel.c
> index 7597befb0b39..19500a134b1e 100644
> --- a/tests/i915/gem_exec_parallel.c
> +++ b/tests/i915/gem_exec_parallel.c
> @@ -229,6 +229,8 @@ static void all(int fd, unsigned engine, unsigned flags)
>   
>   igt_main
>   {
> +	const struct intel_execution_engine2 *e;
> +
>   	const struct mode {
>   		const char *name;
>   		unsigned flags;
> @@ -251,14 +253,13 @@ igt_main
>   		igt_subtest_f("%s", *m->name ? m->name : "basic")
>   			all(fd, ALL_ENGINES, m->flags);

There's a legacy for_each_physical_engine loop in all() under the branch 
which handles ALL_ENGINES which needs to be converted to the new iterator.

>   
> -	for (const struct intel_execution_engine *e = intel_execution_engines;
> -	     e->name; e++) {
> +	__for_each_physical_engine(fd, e) {
>   		for (const struct mode *m = modes; m->name; m++)
>   			igt_subtest_f("%s%s%s",
>   				      e->name,
>   				      *m->name ? "-" : "",
>   				      m->name)
> -				all(fd, e->exec_id | e->flags, m->flags);
> +				all(fd, e->flags, m->flags);
>   	}
>   
>   	igt_fixture {
> 

Regards,

Tvrtko


More information about the igt-dev mailing list