[igt-dev] [RFC v2 07/43] tests/i915/gem_exec_reuse: use the gem_engine_topology library
Ramalingam C
ramalingam.c at intel.com
Fri Jun 21 10:03:09 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_reuse.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/i915/gem_exec_reuse.c b/tests/i915/gem_exec_reuse.c
index 935bfa9ac531..55e49d644013 100644
--- a/tests/i915/gem_exec_reuse.c
+++ b/tests/i915/gem_exec_reuse.c
@@ -39,7 +39,7 @@ struct noop {
};
static void noop(struct noop *n,
- unsigned ring, unsigned ctx,
+ unsigned exec_flags, unsigned ctx,
unsigned int count, unsigned int offset)
{
struct drm_i915_gem_execbuffer2 execbuf;
@@ -52,7 +52,7 @@ static void noop(struct noop *n,
memset(&execbuf, 0, sizeof(execbuf));
execbuf.buffers_ptr = to_user_pointer(n->obj);
execbuf.buffer_count = count + 1;
- execbuf.flags = ring | 1 << 12;
+ execbuf.flags = exec_flags | 1 << 12;
execbuf.rsvd1 = ctx;
gem_execbuf(n->fd, &execbuf);
}
@@ -89,7 +89,7 @@ igt_main
igt_fixture {
uint64_t gtt_size, max;
uint32_t bbe = MI_BATCH_BUFFER_END;
- unsigned engine;
+ const struct intel_execution_engine2 *e;
igt_allow_unlimited_files();
@@ -118,9 +118,9 @@ igt_main
no.obj = malloc(sizeof(struct drm_i915_gem_exec_object2) * (no.max_age + 1));
nengine = 0;
- for_each_engine(no.fd, engine)
- if (engine)
- engines[nengine++] = engine;
+ __for_each_static_engine(e)
+ if (e)
+ engines[nengine++] = e->flags;
igt_require(nengine);
no.batch = gem_create(no.fd, 4096);
--
2.19.1
More information about the igt-dev
mailing list