[igt-dev] [RFC v2 17/43] tests/i915/gem_exec_await: use the gem_engine_topology library

Ramalingam C
2019-06-21T10:01:28Z

tests/i915/gem_exec_await.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/i915/gem_exec_await.c b/tests/i915/gem_exec_await.c
index 5cfeb8ec8bfa..5a3224159948 100644
--- a/tests/i915/gem_exec_await.c
+++ b/tests/i915/gem_exec_await.c
@@ -73,14 +73,15 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
} *exec;
struct drm_i915_gem_exec_object2 *obj;
struct drm_i915_gem_execbuffer2 execbuf;
+ const struct intel_execution_engine2 *engine;
unsigned engines[16];
- unsigned nengine, engine;
+ unsigned nengine;
unsigned long count;
double time;

nengine = 0;
- for_each_physical_engine(fd, engine)
- engines[nengine++] = engine;
+ __for_each_physical_engine(fd, engine)
+ engines[nengine++] = engine->flags;
igt_require(nengine);

exec = calloc(nengine, sizeof(*exec));