summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@intel.com>2019-05-13 02:10:28 +0300
committerAndi Shyti <andi.shyti@intel.com>2019-05-13 03:26:26 +0300
commitd8c7d7eb014add796733e5b994c6241858b9d0e6 (patch)
tree0f68f6f02c6d2dee91ecd85e35e95558cc777066
parent8ea16aad36f61cf3a1f2237bf890f1fe2526031f (diff)
test/i915: gem_ctx_exec: use the gem_engine_topology library
Replace the legacy for_each_engine* defines with the ones implemented in the gem_engine_topology library. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--tests/i915/gem_ctx_exec.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index b8e0e074..c3543bfe 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -111,7 +111,8 @@ static void big_exec(int fd, uint32_t handle, int ring)
gem_sync(fd, handle);
}
-static void invalid_context(int fd, unsigned ring, uint32_t handle)
+static void invalid_context(int fd, struct intel_execution_engine2 *e,
+ uint32_t handle)
{
struct drm_i915_gem_exec_object2 obj = {
.handle = handle,
@@ -119,7 +120,7 @@ static void invalid_context(int fd, unsigned ring, uint32_t handle)
struct drm_i915_gem_execbuffer2 execbuf = {
.buffers_ptr = to_user_pointer(&obj),
.buffer_count = 1,
- .flags = ring,
+ .flags = e->flags,
};
unsigned int i;
uint32_t ctx;
@@ -198,7 +199,7 @@ static void norecovery(int i915)
igt_main
{
const uint32_t batch[2] = { 0, MI_BATCH_BUFFER_END };
- const struct intel_execution_engine *e;
+ struct intel_execution_engine2 *e;
uint32_t handle;
uint32_t ctx_id;
int fd;
@@ -228,11 +229,9 @@ igt_main
gem_sync(fd, handle);
}
- for (e = intel_execution_engines; e->name; e++) {
- igt_subtest_f("basic-invalid-context-%s", e->name) {
- gem_require_ring(fd, e->exec_id | e->flags);
- invalid_context(fd, e->exec_id | e->flags, handle);
- }
+ __for_each_physical_engine(fd, e) {
+ igt_subtest_f("basic-invalid-context-%s", e->name)
+ invalid_context(fd, e, handle);
}
igt_subtest("eviction")