[igt-dev] [RFC v2 09/43] tests/i915/gem_busy: use the gem_engine_topology library
Ramalingam C
ramalingam.c at intel.com
Fri Jun 21 10:03:11 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_busy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index a55358708faf..f66134802137 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -305,6 +305,7 @@ static void close_race(int fd)
{
const unsigned int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
const unsigned int nhandles = gem_measure_ring_inflight(fd, ALL_ENGINES, 0) / 2;
+ const struct intel_execution_engine2 *e;
unsigned int engines[16], nengine;
unsigned long *control;
uint32_t *handles;
@@ -319,8 +320,8 @@ static void close_race(int fd)
*/
nengine = 0;
- for_each_engine(fd, i)
- engines[nengine++] = i;
+ __for_each_static_engine(e)
+ engines[nengine++] = e->flags;
igt_require(nengine);
control = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0);
--
2.19.1
More information about the igt-dev
mailing list