From 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon, 4 Nov 2019 20:15:42 +0000
Subject: [PATCH] i915/gem_exec_balancer: Wait for both engines to complete
 before resubmitting

As the scratch buf is shared between the two requests on both engines,
we need to wait for both to finish using the buffer before we reset it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 tests/i915/gem_exec_balancer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index e52f5df95..70c4529b4 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -840,7 +840,7 @@ static void bonded_slice(int i915)
 			gem_execbuf(i915, &eb);
 			close(eb.rsvd2);
 
-			gem_sync(i915, obj[2].handle);
+			gem_sync(i915, obj[0].handle);
 		}
 
 		*stop = 1;
-- 
GitLab