diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-21 14:13:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-23 16:42:36 +0000 |
commit | 305ebcedc36e98f3118ac27a5bbde0ce7cd71a74 (patch) | |
tree | 3e392be546ac6e667b13ad6b494d724ab4822707 /tests/gem_exec_fence.c | |
parent | f9b6fd624be9692e9a892c0976fa72cedefc9fed (diff) |
Iterate over physical engines
We current have a single for_each_engine() iterator which we use to
generate both a set of uABI engines and a set of physical engines.
Determining what uABI ring-id corresponds to an actual HW engine is
tricky, so pull that out to a library function and introduce
for_each_physical_engine() for cases where we want to issue requests
once on each HW ring (avoiding aliasing issues).
v2: Remember can_store_dword for gem_sync
v3: Find more open-coded for_each_physical
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/gem_exec_fence.c')
-rw-r--r-- | tests/gem_exec_fence.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c index b415199f..93ed3b9b 100644 --- a/tests/gem_exec_fence.c +++ b/tests/gem_exec_fence.c @@ -274,7 +274,7 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags) igt_assert(fence != -1); i = 0; - for_each_engine(fd, engine) { + for_each_physical_engine(fd, engine) { if (!gem_can_store_dword(fd, engine)) continue; @@ -437,10 +437,7 @@ static void test_parallel(int fd, unsigned int master) obj[BATCH].relocation_count = 1; /* Queue all secondaries */ - for_each_engine(fd, engine) { - if (engine == 0 || engine == I915_EXEC_BSD) - continue; - + for_each_physical_engine(fd, engine) { if (engine == master) continue; @@ -616,15 +613,8 @@ static void test_long_history(int fd, long ring_size, unsigned flags) limit = ring_size / 3; nengine = 0; - for_each_engine(fd, engine) { - if (engine == 0) - continue; - - if (engine == I915_EXEC_BSD) - continue; - + for_each_physical_engine(fd, engine) engines[nengine++] = engine; - } igt_require(nengine); gem_quiescent_gpu(fd); |