Lyude Paul wrote a very good intro to vblank here: https://lore.kernel.org/dri-devel/[email protected]/T/#mce6480be738160e9d07c5d023e88fd78d7a06d27
Add this to the intro chapter in drm_vblank.c so others can benefit from it too. v2: - Reworded to improve readability (Thomas) Signed-off-by: Sam Ravnborg <[email protected]> Co-developed-by: Lyude Paul <[email protected]> Cc: Lyude Paul <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> --- drivers/gpu/drm/drm_vblank.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index bcf346b3e486..ec2c2083b186 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -41,6 +41,23 @@ /** * DOC: vblank handling * + * From the computer's perspective, every time the monitor displays + * a new frame the scanout engine have "scanned out" the display image + * from top to bottom, one row of pixels at a time. + * The current row of pixels is referred to as the current scanline. + * + * In addition to the display's visible area, there's usually a couple of + * extra scanlines which aren't actually displayed on the screen + * (the extra scanlines are sometimes used by HDMI audio and friends). + * The period where the extra scanlines are "scanned out" is referred + * to as the vertical blanking period (vblank for short). + * + * On a lot of display hardware, programming needs to take effect during the + * vertical blanking period so that settings like gamma, what frame being + * scanned out, etc. can be safely changed without showing visual tearing + * on the screen. In some unforgiving hardware, some of this programming has + * to both start and end in the same vblank - vertical blanking period. + * * Vertical blanking plays a major role in graphics rendering. To achieve * tear-free display, users must synchronize page flips and/or rendering to * vertical blanking. The DRM API offers ioctls to perform page flips -- 2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
