summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-05-31 13:34:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-05-31 13:34:08 +0100
commitfceead55c93b81c2c076a087d9200b93bfcf407d (patch)
tree69842957ff88aefdfa285af00a75a3fa4dc67b93 /tests
parentad5a470ca27912cd0dd07e067001e9e4e998e8c7 (diff)
i915/gem_exec_balancer: Cleanup skipped bonded-sync phases
Since we create a few GPU objects in the locals, if we decided to skip this bonded-sync phase, we need to jump to the cleanup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/i915/gem_exec_balancer.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index e6aae946..026f8347 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -1444,17 +1444,13 @@ static void __bonded_sync(int i915,
.flags = EXEC_OBJECT_PINNED
};
unsigned long cycles = 0;
- int timeline;
+ int timeline = sw_sync_timeline_create();
- if (!(flags & B_HOSTILE)) { /* always non-preemptible */
- *out = 0;
- return;
- }
+ if (!(flags & B_HOSTILE)) /* always non-preemptible */
+ goto out;
set_load_balancer(i915, execbuf.rsvd1, siblings, count, NULL);
- timeline = sw_sync_timeline_create();
-
srandom(getpid());
igt_until_timeout(2) {
int master;
@@ -1504,6 +1500,7 @@ static void __bonded_sync(int i915,
igt_swap(a, b);
}
+out:
close(timeline);
gem_close(i915, a.handle);
gem_close(i915, b.handle);