Lines Matching full:vblank
39 /* Access macro for slots in vblank timestamp ringbuffer. */
50 * vblank irq in drm_handle_vblank(). 1 msec should be ok.
82 * Clear vblank timestamp buffer for a crtc.
91 * Disable vblank irq's on crtc, make sure that last vblank count
92 * of hardware and corresponding consistent software vblank counter
93 * are preserved, even if there are any spurious vblank irq's after
104 /* Prevent vblank irq processing while disabling vblank irqs, in vblank_disable_and_save()
113 /* No further vblank irq's will be processed after in vblank_disable_and_save()
114 * this point. Get current hardware vblank count and in vblank_disable_and_save()
115 * vblank timestamp, repeat until they are consistent. in vblank_disable_and_save()
119 * reinitialization of software vblank counter. If gpu in vblank_disable_and_save()
120 * vblank counter doesn't increment exactly at the leading in vblank_disable_and_save()
121 * edge of a vblank interval, then we can lose 1 count if in vblank_disable_and_save()
122 * we happen to execute between start of vblank and the in vblank_disable_and_save()
133 /* Compute time difference to stored timestamp of last vblank in vblank_disable_and_save()
134 * as updated by last invocation of drm_handle_vblank() in vblank irq. in vblank_disable_and_save()
142 * disable inside a new vblank interval, the tvblank timestamp in vblank_disable_and_save()
143 * corresponds to this new vblank interval and the irq handler in vblank_disable_and_save()
144 * for this vblank didn't run yet and won't run due to our disable. in vblank_disable_and_save()
146 * increment the vblank counter by one to account for this vblank. in vblank_disable_and_save()
157 /* Invalidate all timestamps while vblank irq's are off. */ in vblank_disable_and_save()
175 DRM_DEBUG("disabling vblank on crtc %d\n", i); in vblank_disable_fn()
252 DRM_INFO("Supports vblank timestamp caching Rev 1 (10.10.2010).\n"); in drm_vblank_init()
254 /* Driver specific high-precision vblank timestamping supported? */ in drm_vblank_init()
256 DRM_INFO("Driver supports precise vblank timestamp query.\n"); in drm_vblank_init()
258 DRM_INFO("No driver support for vblank timestamp query.\n"); in drm_vblank_init()
260 /* Zero per-crtc vblank stuff */ in drm_vblank_init()
449 * vblank and swap-completion timestamping, e.g, by
501 * drivers. Implements calculation of exact vblank timestamps from
508 * the vblank interval, aka start of scanout of topmost-leftmost display
520 * @crtc: Which crtc's vblank timestamp to retrieve.
540 * DRM_VBLANKTIME_INVBL - Timestamp taken while scanout was in vblank interval.
635 /* Check if in vblank area: in drm_calc_vbltimestamp_from_scanoutpos()
637 * within vblank area, counting down the number of lines until in drm_calc_vbltimestamp_from_scanoutpos()
648 /* Is vpos outside nominal vblank area, but less than in drm_calc_vbltimestamp_from_scanoutpos()
649 * 1/100 of a frame height away from start of vblank? in drm_calc_vbltimestamp_from_scanoutpos()
650 * If so, assume this isn't a massively delayed vblank in drm_calc_vbltimestamp_from_scanoutpos()
651 * interrupt, but a vblank interrupt that fired a few in drm_calc_vbltimestamp_from_scanoutpos()
652 * microseconds before true start of vblank. Compensate in drm_calc_vbltimestamp_from_scanoutpos()
674 * vblank_time timestamp for end of vblank. in drm_calc_vbltimestamp_from_scanoutpos()
706 * vblank interval.
709 * @crtc: which crtc's vblank timestamp to retrieve
716 * vblank interval on specified crtc. May call into kms-driver to
720 * call, i.e., it isn't very precisely locked to the true vblank.
750 * drm_vblank_count - retrieve "cooked" vblank counter value
754 * Fetches the "cooked" vblank count value that represents the number of
755 * vblank events since the system was booted, including lost events due to
765 * drm_vblank_count_and_time - retrieve "cooked" vblank counter value
766 * and the system timestamp corresponding to that vblank counter value.
770 * @vblanktime: Pointer to struct timeval to receive the vblank timestamp.
772 * Fetches the "cooked" vblank count value that represents the number of
773 * vblank events since the system was booted, including lost events due to
775 * of the vblank interval that corresponds to the current value vblank counter
784 * that corresponds to current vblank count. Retry if in drm_vblank_count_and_time()
815 * drm_send_vblank_event - helper to send vblank event after pageflip
840 * drm_update_vblank_count - update the master vblank counter
844 * Call back into the driver to update the appropriate vblank counter
853 * device vblank fields.
864 * here if the register is small or we had vblank interrupts off for in drm_update_vblank_count()
867 * We repeat the hardware vblank counter & timestamp query until in drm_update_vblank_count()
870 * corresponding vblank timestamp. in drm_update_vblank_count()
886 DRM_DEBUG("enabling vblank interrupts on crtc %d, missed %d\n", in drm_update_vblank_count()
889 /* Reinitialize corresponding vblank timestamp if high-precision query in drm_update_vblank_count()
891 * reinitialize delayed at next vblank interrupt in that case. in drm_update_vblank_count()
904 * drm_vblank_get - get a reference count on vblank events
908 * Acquire a reference count on vblank events to avoid having them disabled
923 /* Enable vblank irqs under vblank_time_lock protection. in drm_vblank_get()
924 * All vblank count & timestamp updates are held off in drm_vblank_get()
927 * prevent double-accounting of same vblank interval. in drm_vblank_get()
930 DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", in drm_vblank_get()
953 * drm_vblank_put - give up ownership of vblank events
957 * Release ownership of a given vblank counter, turning off interrupts
974 * drm_vblank_off - disable vblank events on a CRTC
990 /* Send any queued vblank events, lest the natives grow disquiet */ in drm_vblank_off()
997 DRM_DEBUG("Sending premature vblank event on disable: \ in drm_vblank_off()
1015 * Account for vblank events across mode setting events, which will likely
1020 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_vblank_pre_modeset()
1040 /* vblank is not initialized (IRQ not installed ?), or has been freed */ in drm_vblank_post_modeset()
1058 * drm_modeset_ctl - handle vblank event counter changes across mode switch
1062 * ioctls around modesetting so that any lost vblank events are accounted for.
1147 DRM_DEBUG("event on vblank count %d, current %d, crtc %d\n", in drm_queue_vblank_event()
1177 * Wait for VBLANK.
1185 * This function enables the vblank interrupt on the pipe requested, then
1187 * the vblank interrupt refcount afterwards. (vblank irq disable follows that
1188 * after a timeout with no further vblank waits scheduled).
1224 DRM_DEBUG("failed to acquire vblank counter, %d\n", ret); in drm_wait_vblank()
1241 /* must hold on to the vblank ref until the event fires in drm_wait_vblank()
1252 DRM_DEBUG("waiting on vblank count %d, crtc %d\n", in drm_wait_vblank()
1294 DRM_DEBUG("vblank wait interrupted by signal\n"); in drm_wait_vblank()
1318 DRM_DEBUG("vblank event on %d, current %d\n", in drm_handle_vblank_events()
1332 * drm_handle_vblank - handle a vblank event
1336 * Drivers should call this routine in their vblank interrupt handlers to
1337 * update the vblank counter and send any signals that may be pending.
1349 * vblank enable/disable, as this would cause inconsistent in drm_handle_vblank()
1350 * or corrupted timestamps and vblank counts. in drm_handle_vblank()
1354 /* Vblank irq handling disabled. Nothing to do. */ in drm_handle_vblank()
1360 /* Fetch corresponding timestamp for this vblank interval from in drm_handle_vblank()
1368 /* Compute time difference to timestamp of last vblank */ in drm_handle_vblank()
1372 /* Update vblank timestamp and count if at least in drm_handle_vblank()
1376 * identical timestamps. Happens if this vblank has in drm_handle_vblank()
1378 * e.g., due to spurious vblank interrupts. We need to in drm_handle_vblank()
1385 /* Increment cooked vblank count. This also atomically commits in drm_handle_vblank()