Lines Matching full:wait
27 nvkm_timer_wait_test(struct nvkm_timer_wait *wait) in nvkm_timer_wait_test() argument
29 struct nvkm_subdev *subdev = &wait->tmr->subdev; in nvkm_timer_wait_test()
30 u64 time = nvkm_timer_read(wait->tmr); in nvkm_timer_wait_test()
32 if (wait->reads == 0) { in nvkm_timer_wait_test()
33 wait->time0 = time; in nvkm_timer_wait_test()
34 wait->time1 = time; in nvkm_timer_wait_test()
37 if (wait->time1 == time) { in nvkm_timer_wait_test()
38 if (wait->reads++ == 16) { in nvkm_timer_wait_test()
43 wait->time1 = time; in nvkm_timer_wait_test()
44 wait->reads = 1; in nvkm_timer_wait_test()
47 if (wait->time1 - wait->time0 > wait->limit) in nvkm_timer_wait_test()
50 return wait->time1 - wait->time0; in nvkm_timer_wait_test()
55 struct nvkm_timer_wait *wait) in nvkm_timer_wait_init() argument
57 wait->tmr = device->timer; in nvkm_timer_wait_init()
58 wait->limit = nsec; in nvkm_timer_wait_init()
59 wait->reads = 0; in nvkm_timer_wait_init()