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

Ramalingam C ramalingam.c at intel.com
Fri Jun 21 10:03:19 UTC 2019


Replace the legacy for_each_engine* defines with the ones
implemented in the gem_engine_topology library.

Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
 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));
-- 
2.19.1



More information about the igt-dev mailing list