[PATCH i-g-t 40/58] tests/sysfs_timeslice_duration: Adopt to use no-reloc
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Jul 6 07:09:17 UTC 2021
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
---
tests/i915/sysfs_timeslice_duration.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/i915/sysfs_timeslice_duration.c b/tests/i915/sysfs_timeslice_duration.c
index 05ab79667..ec50ff2b8 100644
--- a/tests/i915/sysfs_timeslice_duration.c
+++ b/tests/i915/sysfs_timeslice_duration.c
@@ -37,6 +37,7 @@
#include "i915/gem_mman.h"
#include "igt_dummyload.h"
#include "igt_sysfs.h"
+#include "intel_allocator.h"
#include "ioctl_wrappers.h"
#include "intel_chipset.h"
#include "intel_reg.h"
@@ -372,6 +373,7 @@ static uint64_t __test_timeout(int i915, int engine, unsigned int timeout)
igt_spin_t *spin[2];
uint64_t elapsed;
uint32_t ctx[2];
+ uint64_t ahnd[2];
igt_assert(igt_sysfs_scanf(engine, "class", "%u", &class) == 1);
igt_assert(igt_sysfs_scanf(engine, "instance", "%u", &inst) == 1);
@@ -379,15 +381,20 @@ static uint64_t __test_timeout(int i915, int engine, unsigned int timeout)
set_timeslice(engine, timeout);
ctx[0] = create_context(i915, class, inst, 0);
+ ahnd[0] = get_reloc_ahnd(i915, ctx[0]);
spin[0] = igt_spin_new(i915, ctx[0],
+ .ahnd = ahnd[0],
.flags = (IGT_SPIN_NO_PREEMPTION |
IGT_SPIN_POLL_RUN |
IGT_SPIN_FENCE_OUT));
igt_spin_busywait_until_started(spin[0]);
ctx[1] = create_context(i915, class, inst, 0);
+ ahnd[1] = get_reloc_ahnd(i915, ctx[1]);
igt_nsec_elapsed(&ts);
- spin[1] = igt_spin_new(i915, ctx[1], .flags = IGT_SPIN_POLL_RUN);
+ spin[1] = igt_spin_new(i915, ctx[1],
+ .ahnd = ahnd[1],
+ .flags = IGT_SPIN_POLL_RUN);
igt_spin_busywait_until_started(spin[1]);
elapsed = igt_nsec_elapsed(&ts);
@@ -400,6 +407,8 @@ static uint64_t __test_timeout(int i915, int engine, unsigned int timeout)
gem_context_destroy(i915, ctx[1]);
gem_context_destroy(i915, ctx[0]);
+ put_ahnd(ahnd[1]);
+ put_ahnd(ahnd[0]);
gem_quiescent_gpu(i915);
return elapsed;
--
2.26.0
More information about the Intel-gfx-trybot
mailing list