diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-17 18:28:33 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-18 17:04:09 +0300 |
commit | a765aa108105804c19096554447ad0cb71f64fc3 (patch) | |
tree | 5570cc9b5c6a733268d56a3a96939873d254e61b /tests/i915/gem_wait.c | |
parent | 226b9995d1fb486d34cd35428025b55532e9e3d1 (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_wait.c')
-rw-r--r-- | tests/i915/gem_wait.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/i915/gem_wait.c b/tests/i915/gem_wait.c index 7914c936..ee2ecfa0 100644 --- a/tests/i915/gem_wait.c +++ b/tests/i915/gem_wait.c @@ -74,9 +74,9 @@ static void basic(int fd, unsigned engine, unsigned flags) IGT_CORK_HANDLE(cork); uint32_t plug = flags & (WRITE | AWAIT) ? igt_cork_plug(&cork, fd) : 0; - igt_spin_t *spin = igt_spin_batch_new(fd, - .engine = engine, - .dependency = plug); + igt_spin_t *spin = igt_spin_new(fd, + .engine = engine, + .dependency = plug); struct drm_i915_gem_wait wait = { flags & WRITE ? plug : spin->handle }; @@ -89,7 +89,7 @@ static void basic(int fd, unsigned engine, unsigned flags) timeout = 120; if ((flags & HANG) == 0) { - igt_spin_batch_set_timeout(spin, NSEC_PER_SEC/2); + igt_spin_set_timeout(spin, NSEC_PER_SEC/2); timeout = 1; } @@ -112,7 +112,7 @@ static void basic(int fd, unsigned engine, unsigned flags) igt_assert_eq(__gem_wait(fd, &wait), -ETIME); if ((flags & HANG) == 0) { - igt_spin_batch_set_timeout(spin, NSEC_PER_SEC/2); + igt_spin_set_timeout(spin, NSEC_PER_SEC/2); wait.timeout_ns = NSEC_PER_SEC; /* 1.0s */ igt_assert_eq(__gem_wait(fd, &wait), 0); igt_assert(wait.timeout_ns >= 0); @@ -129,7 +129,7 @@ static void basic(int fd, unsigned engine, unsigned flags) if (plug) gem_close(fd, plug); - igt_spin_batch_free(fd, spin); + igt_spin_free(fd, spin); } igt_main |