From a765aa108105804c19096554447ad0cb71f64fc3 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Wed, 17 Apr 2019 18:28:33 +0300 Subject: lib/igt_dummyload: Get rid of 'batch' on spinner accessors There is no guarantee that spinners are and will be implemented using batches. As we have igt_spin_t, manipulate it through igt_spin_* functions consistently and hide the batch nature. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson --- tests/i915/gem_exec_reloc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/i915/gem_exec_reloc.c') diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c index 837f60a6..fdd9661d 100644 --- a/tests/i915/gem_exec_reloc.c +++ b/tests/i915/gem_exec_reloc.c @@ -388,11 +388,11 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) } if (flags & ACTIVE) { - spin = igt_spin_batch_new(fd, - .engine = I915_EXEC_DEFAULT, - .dependency = obj.handle); + spin = igt_spin_new(fd, + .engine = I915_EXEC_DEFAULT, + .dependency = obj.handle); if (!(flags & HANG)) - igt_spin_batch_set_timeout(spin, NSEC_PER_SEC/100); + igt_spin_set_timeout(spin, NSEC_PER_SEC/100); igt_assert(gem_bo_busy(fd, obj.handle)); } @@ -424,7 +424,7 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) igt_assert_eq_u64(reloc.presumed_offset, offset); igt_assert_eq_u64(obj.offset, offset); - igt_spin_batch_free(fd, spin); + igt_spin_free(fd, spin); /* Simulate relocation */ if (flags & NORELOC) { @@ -456,11 +456,11 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) } if (flags & ACTIVE) { - spin = igt_spin_batch_new(fd, - .engine = I915_EXEC_DEFAULT, - .dependency = obj.handle); + spin = igt_spin_new(fd, + .engine = I915_EXEC_DEFAULT, + .dependency = obj.handle); if (!(flags & HANG)) - igt_spin_batch_set_timeout(spin, NSEC_PER_SEC/100); + igt_spin_set_timeout(spin, NSEC_PER_SEC/100); igt_assert(gem_bo_busy(fd, obj.handle)); } @@ -492,7 +492,7 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags) igt_assert_eq_u64(reloc.presumed_offset, offset); igt_assert_eq_u64(obj.offset, offset); - igt_spin_batch_free(fd, spin); + igt_spin_free(fd, spin); if (trash) gem_close(fd, trash); } @@ -585,14 +585,14 @@ static void basic_range(int fd, unsigned flags) execbuf.buffer_count = n + 1; if (flags & ACTIVE) { - spin = igt_spin_batch_new(fd, .dependency = obj[n].handle); + spin = igt_spin_new(fd, .dependency = obj[n].handle); if (!(flags & HANG)) - igt_spin_batch_set_timeout(spin, NSEC_PER_SEC/100); + igt_spin_set_timeout(spin, NSEC_PER_SEC/100); igt_assert(gem_bo_busy(fd, obj[n].handle)); } gem_execbuf(fd, &execbuf); - igt_spin_batch_free(fd, spin); + igt_spin_free(fd, spin); for (int i = 0; i < n; i++) { uint64_t offset; -- cgit v1.2.3