Skip to contentSkip to conversation

i915/gem_exec_balancer: fix parallel_ordering with no-reloc

PATCH In review Nirmoy Das 1 participant 2 messages Jun 10, 2022

lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 i915/gem_exec_balancer: fix parallel_ordering with no-reloc

Make sure to allocate ahnd so that spinner starts with no-reloc execbuf otherwise this will fail on platforms with relocation disabled.

---
 tests/i915/gem_exec_balancer.c | 3 +++
 1 file changed, 3 insertions(+)
tests/i915/gem_exec_balancer.c +3 -0
index 186975c46..636c96f9e 100644
@@ -3108,6 +3108,7 @@ static void parallel_ordering(int i915, unsigned int flags)
 		unsigned int count;
 		int i = 0, fence = 0;
 		uint32_t batch[16];
+		uint64_t ahnd;
 		struct drm_i915_gem_execbuffer2 execbuf;
 		struct drm_i915_gem_exec_object2 obj[32];
 		igt_spin_t *spin;
@@ -3162,7 +3163,9 @@ static void parallel_ordering(int i915, unsigned int flags)
 
 		/* Block parallel submission */
 		spin_ctx = ctx_create_engines(i915, siblings, count);
+		ahnd = get_simple_ahnd(i915, spin_ctx->id);
 		spin = __igt_spin_new(i915,
+				      .ahnd = ahnd,
 				      .ctx = spin_ctx,
 				      .engine = 0,
 				      .flags = IGT_SPIN_FENCE_OUT |
Signature · 1 line
2.35.1
#1 lore raw

wrong mailing list, Ignore this.

Quoted 31 lines · Nirmoy Das

Make sure to allocate ahnd so that spinner starts with no-reloc execbuf otherwise this will fail on platforms with relocation disabled.

---
  tests/i915/gem_exec_balancer.c | 3 +++
  1 file changed, 3 insertions(+)
tests/i915/gem_exec_balancer.c +3 -0
index 186975c46..636c96f9e 100644
@@ -3108,6 +3108,7 @@ static void parallel_ordering(int i915, unsigned int flags)
  		unsigned int count;
  		int i = 0, fence = 0;
  		uint32_t batch[16];
+		uint64_t ahnd;
  		struct drm_i915_gem_execbuffer2 execbuf;
  		struct drm_i915_gem_exec_object2 obj[32];
  		igt_spin_t *spin;
@@ -3162,7 +3163,9 @@ static void parallel_ordering(int i915, unsigned int flags)
 
  		/* Block parallel submission */
  		spin_ctx = ctx_create_engines(i915, siblings, count);
+		ahnd = get_simple_ahnd(i915, spin_ctx->id);
  		spin = __igt_spin_new(i915,
+				      .ahnd = ahnd,
  				      .ctx = spin_ctx,
  				      .engine = 0,
  				      .flags = IGT_SPIN_FENCE_OUT |