[PATCH i-g-t 26/58] tests/gem_watchdog: Adopt to use no-reloc
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Jul 6 07:09:03 UTC 2021
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
tests/i915/gem_watchdog.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/i915/gem_watchdog.c b/tests/i915/gem_watchdog.c
index 92cb4e856..d656514cf 100644
--- a/tests/i915/gem_watchdog.c
+++ b/tests/i915/gem_watchdog.c
@@ -135,10 +135,12 @@ static void physical(int i915)
const struct intel_execution_engine2 *e;
unsigned int expect = num_engines;
igt_spin_t *spin[num_engines];
+ uint64_t ahnd = get_reloc_ahnd(i915, 0);
i = 0;
__for_each_physical_engine(i915, e) {
spin[i] = igt_spin_new(i915,
+ .ahnd = ahnd,
.engine = e->flags,
.flags = spin_flags());
i++;
@@ -148,6 +150,7 @@ static void physical(int i915)
for (i = 0; i < num_engines; i++)
igt_spin_free(i915, spin[i]);
+ put_ahnd(ahnd);
igt_assert_eq(count, expect);
}
@@ -276,6 +279,7 @@ static void virtual(int i915)
unsigned int expect = num_engines;
uint32_t ctx[num_engines];
uint32_t vm;
+ uint64_t ahnd;
igt_require(gem_has_execlists(i915));
@@ -302,10 +306,12 @@ static void virtual(int i915)
vm = ctx_get_vm(i915, ctx[i]);
else
ctx_set_vm(i915, ctx[i], vm);
+ ahnd = get_reloc_ahnd(i915, ctx[i]);
set_load_balancer(i915, ctx[i], ci, count, NULL);
spin[i] = igt_spin_new(i915,
+ .ahnd = ahnd,
.ctx_id = ctx[i],
.flags = spin_flags());
i++;
@@ -318,7 +324,9 @@ static void virtual(int i915)
for (i = 0; i < num_engines && spin[i]; i++) {
gem_context_destroy(i915, ctx[i]);
+ ahnd = spin[i]->ahnd;
igt_spin_free(i915, spin[i]);
+ put_ahnd(ahnd);
}
igt_assert_eq(count, expect);
--
2.26.0
More information about the Intel-gfx-trybot
mailing list