summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_reloc.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2019-04-17 18:28:33 +0300
committerMika Kuoppala <mika.kuoppala@linux.intel.com>2019-04-18 17:04:09 +0300
commita765aa108105804c19096554447ad0cb71f64fc3 (patch)
tree5570cc9b5c6a733268d56a3a96939873d254e61b /tests/i915/gem_exec_reloc.c
parent226b9995d1fb486d34cd35428025b55532e9e3d1 (diff)
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 <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_exec_reloc.c')
-rw-r--r--tests/i915/gem_exec_reloc.c26
1 files changed, 13 insertions, 13 deletions
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;