carta
drm_vblank_pre_modeset(9)

drm_vblank_pre_modeset9

Account for vblanks across mode sets

Arguments

dev

DRM device

crtc

CRTC in question

Overview

Account for vblank events across mode setting events, which will likely reset the hardware frame counter.

This is done by grabbing a temporary vblank reference to ensure that the vblank interrupt keeps running across the modeset sequence. With this the software-side vblank frame counting will ensure that there are no jumps or discontinuities.

Unfortunately this approach is racy and also doesn't work when the vblank interrupt stops running, e.g. across system suspend resume. It is therefore highly recommended that drivers use the newer drm_vblank_off and drm_vblank_on instead. drm_vblank_pre_modeset only works correctly when using “cooked” software vblank frame counters and not relying on any hardware counters.

Drivers must call drm_vblank_post_modeset when re-enabling the same crtc again.

Authors

Jesse Barnes <[email protected]>
Intel Corporation,

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,

Contributions all over the place

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.