Lines Matching refs:spin
74 igt_spin_t *spin[2]; in poll_ring() local
80 spin[0] = __igt_spin_factory(fd, &opts); in poll_ring()
81 igt_assert(igt_spin_has_poll(spin[0])); in poll_ring()
83 spin[1] = __igt_spin_factory(fd, &opts); in poll_ring()
84 igt_assert(igt_spin_has_poll(spin[1])); in poll_ring()
86 igt_spin_end(spin[0]); in poll_ring()
87 igt_spin_busywait_until_started(spin[1]); in poll_ring()
89 igt_assert(!gem_bo_busy(fd, spin[0]->handle)); in poll_ring()
95 igt_spin_reset(spin[idx]); in poll_ring()
97 gem_execbuf(fd, &spin[idx]->execbuf); in poll_ring()
99 igt_spin_end(spin[!idx]); in poll_ring()
100 igt_spin_busywait_until_started(spin[idx]); in poll_ring()
106 igt_spin_free(fd, spin[1]); in poll_ring()
107 igt_spin_free(fd, spin[0]); in poll_ring()
120 igt_spin_t *spin = NULL; in latency_on_ring() local
191 spin = igt_spin_new(fd, .engine = ring); in latency_on_ring()
208 igt_spin_free(fd, spin); in latency_on_ring()
315 igt_spin_t *spin = NULL; in latency_from_ring() local
323 spin = __igt_spin_new(fd, in latency_from_ring()
392 igt_spin_free(fd, spin); in latency_from_ring()
414 __submit_spin(int fd, igt_spin_t *spin, unsigned int flags) in __submit_spin() argument
416 struct drm_i915_gem_execbuffer2 eb = spin->execbuf; in __submit_spin()
429 static bool __spin_wait(int fd, igt_spin_t *spin) in __spin_wait() argument
431 while (!igt_spin_has_started(spin)) { in __spin_wait()
432 if (!gem_bo_busy(fd, spin->handle)) in __spin_wait()
502 igt_spin_t *spin; in rthog_latency_on_ring() local
521 spin = __igt_spin_factory(fd, &opts); in rthog_latency_on_ring()
522 if (!spin) { in rthog_latency_on_ring()
527 igt_spin_busywait_until_started(spin); in rthog_latency_on_ring()
533 igt_spin_end(spin); in rthog_latency_on_ring()
534 gem_sync(fd, spin->handle); in rthog_latency_on_ring()
547 igt_spin_reset(spin); in rthog_latency_on_ring()
550 __submit_spin(fd, spin, engine); in rthog_latency_on_ring()
551 if (!__spin_wait(fd, spin)) { in rthog_latency_on_ring()
566 igt_spin_free(fd, spin); in rthog_latency_on_ring()