diff mbox series

[i-g-t,1/4] i915/gem_exec_balancer: Beware the migratory fence

Message ID 20190907115952.3227-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [i-g-t,1/4] i915/gem_exec_balancer: Beware the migratory fence | expand

Commit Message

Chris Wilson Sept. 7, 2019, 11:59 a.m. UTC
If the object needs to be migrated, it may will need GPU relocs and so
have an exclusive fence showing up in the write domain.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_balancer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Matthew Auld Sept. 13, 2019, 6:39 p.m. UTC | #1
On Sat, 7 Sep 2019 at 13:00, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> If the object needs to be migrated, it may will need GPU relocs and so
> have an exclusive fence showing up in the write domain.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
diff mbox series

Patch

diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
index cda156ea6..407dc0eca 100644
--- a/tests/i915/gem_exec_balancer.c
+++ b/tests/i915/gem_exec_balancer.c
@@ -830,10 +830,10 @@  static void busy(int i915)
 		do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);
 		igt_assert_eq_u32(busy.busy, 1u << (class + 16));
 
-		/* Queued(read): expected class */
+		/* Queued(read, maybe write if being migrated): expected class */
 		busy.handle = spin[1]->handle;
 		do_ioctl(i915, DRM_IOCTL_I915_GEM_BUSY, &busy);
-		igt_assert_eq_u32(busy.busy, 1u << (class + 16));
+		igt_assert_eq_u32(busy.busy & 0xffff << 16, 1u << (class + 16));
 
 		/* Queued(write): expected class */
 		busy.handle = scratch;