Lines Matching refs:vblank
46 void drm_handle_vblank_works(struct drm_vblank_crtc *vblank) in drm_handle_vblank_works() argument
49 u64 count = atomic64_read(&vblank->count); in drm_handle_vblank_works()
52 assert_spin_locked(&vblank->dev->event_lock); in drm_handle_vblank_works()
54 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_handle_vblank_works()
59 drm_vblank_put(vblank->dev, vblank->pipe); in drm_handle_vblank_works()
60 kthread_queue_work(vblank->worker, &work->base); in drm_handle_vblank_works()
64 wake_up_all(&vblank->work_wait_queue); in drm_handle_vblank_works()
70 void drm_vblank_cancel_pending_works(struct drm_vblank_crtc *vblank) in drm_vblank_cancel_pending_works() argument
74 assert_spin_locked(&vblank->dev->event_lock); in drm_vblank_cancel_pending_works()
76 list_for_each_entry_safe(work, next, &vblank->pending_work, node) { in drm_vblank_cancel_pending_works()
78 drm_vblank_put(vblank->dev, vblank->pipe); in drm_vblank_cancel_pending_works()
81 wake_up_all(&vblank->work_wait_queue); in drm_vblank_cancel_pending_works()
109 struct drm_vblank_crtc *vblank = work->vblank; in drm_vblank_work_schedule() local
110 struct drm_device *dev = vblank->dev; in drm_vblank_work_schedule()
121 inmodeset = vblank->inmodeset; in drm_vblank_work_schedule()
127 ret = drm_vblank_get(dev, vblank->pipe); in drm_vblank_work_schedule()
138 cur_vbl = drm_vblank_count(dev, vblank->pipe); in drm_vblank_work_schedule()
143 vblank->pipe, count, cur_vbl); in drm_vblank_work_schedule()
146 drm_vblank_put(dev, vblank->pipe); in drm_vblank_work_schedule()
147 ret = kthread_queue_work(vblank->worker, &work->base); in drm_vblank_work_schedule()
155 list_add_tail(&work->node, &vblank->pending_work); in drm_vblank_work_schedule()
162 wake_up_all(&vblank->work_wait_queue); in drm_vblank_work_schedule()
184 struct drm_vblank_crtc *vblank = work->vblank; in drm_vblank_work_cancel_sync() local
185 struct drm_device *dev = vblank->dev; in drm_vblank_work_cancel_sync()
191 drm_vblank_put(vblank->dev, vblank->pipe); in drm_vblank_work_cancel_sync()
198 wake_up_all(&vblank->work_wait_queue); in drm_vblank_work_cancel_sync()
220 struct drm_vblank_crtc *vblank = work->vblank; in drm_vblank_work_flush() local
221 struct drm_device *dev = vblank->dev; in drm_vblank_work_flush()
224 wait_event_lock_irq(vblank->work_wait_queue, list_empty(&work->node), in drm_vblank_work_flush()
245 work->vblank = &crtc->dev->vblank[drm_crtc_index(crtc)]; in drm_vblank_work_init()
249 int drm_vblank_worker_init(struct drm_vblank_crtc *vblank) in drm_vblank_worker_init() argument
253 INIT_LIST_HEAD(&vblank->pending_work); in drm_vblank_worker_init()
254 init_waitqueue_head(&vblank->work_wait_queue); in drm_vblank_worker_init()
256 vblank->dev->primary->index, in drm_vblank_worker_init()
257 vblank->pipe); in drm_vblank_worker_init()
261 vblank->worker = worker; in drm_vblank_worker_init()