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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon May 13 11:46:35 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_wait.c | 24 ++++++++++++------------
>   1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/i915/gem_wait.c b/tests/i915/gem_wait.c
> index ee2ecfa0d056..b5e32219d77b 100644
> --- a/tests/i915/gem_wait.c
> +++ b/tests/i915/gem_wait.c
> @@ -134,7 +134,7 @@ static void basic(int fd, unsigned engine, unsigned flags)
>   
>   igt_main
>   {
> -	const struct intel_execution_engine *e;
> +	const struct intel_execution_engine2 *e;
>   	int fd = -1;
>   
>   	igt_skip_on_simulation();
> @@ -177,27 +177,27 @@ igt_main
>   			basic(fd, ALL_ENGINES, WRITE);
>   		}
>   
> -		for (e = intel_execution_engines; e->name; e++) {
> +		__for_each_physical_engine(fd, e) {
>   			igt_subtest_group {
>   				igt_subtest_f("busy-%s", e->name) {
>   					gem_quiescent_gpu(fd);
> -					basic(fd, e->exec_id | e->flags, BUSY);
> +					basic(fd, e->flags, BUSY);
>   				}
>   				igt_subtest_f("wait-%s", e->name) {
>   					gem_quiescent_gpu(fd);
> -					basic(fd, e->exec_id | e->flags, 0);
> +					basic(fd, e->flags, 0);
>   				}
>   				igt_subtest_f("await-%s", e->name) {
>   					gem_quiescent_gpu(fd);
> -					basic(fd, e->exec_id | e->flags, AWAIT);
> +					basic(fd, e->flags, AWAIT);
>   				}
>   				igt_subtest_f("write-busy-%s", e->name) {
>   					gem_quiescent_gpu(fd);
> -					basic(fd, e->exec_id | e->flags, BUSY | WRITE);
> +					basic(fd, e->flags, BUSY | WRITE);
>   				}
>   				igt_subtest_f("write-wait-%s", e->name) {
>   					gem_quiescent_gpu(fd);
> -					basic(fd, e->exec_id | e->flags, WRITE);
> +					basic(fd, e->flags, WRITE);
>   				}
>   			}
>   		}
> @@ -234,22 +234,22 @@ igt_main
>   			basic(fd, ALL_ENGINES, WRITE | HANG);
>   		}
>   
> -		for (e = intel_execution_engines; e->name; e++) {
> +		__for_each_physical_engine(fd, e) {
>   			igt_subtest_f("hang-busy-%s", e->name) {
>   				gem_quiescent_gpu(fd);
> -				basic(fd, e->exec_id | e->flags, HANG | BUSY);
> +				basic(fd, e->flags, HANG | BUSY);
>   			}
>   			igt_subtest_f("hang-wait-%s", e->name) {
>   				gem_quiescent_gpu(fd);
> -				basic(fd, e->exec_id | e->flags, HANG);
> +				basic(fd, e->flags, HANG);
>   			}
>   			igt_subtest_f("hang-busy-write-%s", e->name) {
>   				gem_quiescent_gpu(fd);
> -				basic(fd, e->exec_id | e->flags, HANG | WRITE | BUSY);
> +				basic(fd, e->flags, HANG | WRITE | BUSY);
>   			}
>   			igt_subtest_f("hang-wait-write-%s", e->name) {
>   				gem_quiescent_gpu(fd);
> -				basic(fd, e->exec_id | e->flags, HANG | WRITE);
> +				basic(fd, e->flags, HANG | WRITE);
>   			}
>   		}
>   
> 

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

Regards,

Tvrtko


More information about the igt-dev mailing list