drm_crtc_vbl...vblank_timer(9)
π drm_crtc_vbl...vblank_timer(9)
okay so this is a page from the Kernel API Manual, and bestie, it's a whole little vibe about making a fake vblank out of a timer. yes it's as niche as it sounds and yes it's iconic. π
β¨ NAME β¨
drm_crtc_vblank_helper_enable_vblank_timer β literally implements struct &drm_crtc_funcs.enable_vblank, that's the whole job π«Ά
πΈ SYNOPSIS πΈ
int drm_crtc_vblank_helper_enable_vblank_timer (struct drm_crtc *crtc );
π¦ ARGUMENTS π¦
crtcβ The CRTC. that's it, that's the argument, she's the main character π
π DESCRIPTION π
okay so picture this: the helper drm_crtc_vblank_helper_enable_vblank_timer implements enable_vblank of struct drm_crtc_helper_funcs, but specifically for CRTCs that require a VBLANK timer β like, no hardware vblank to be found, so we're doing it ourselves, no cap β
the way it works: it sets up the timer on the first invocation. once started, that timer expires after the current frame duration β and if you wanna know what that number actually is, go look at struct drm_vblank_crtc.framedur_ns, she's holding the receipts π
also see struct drm_crtc_helper_funcs.enable_vblank β same vibe, that's the callback we're filling in π
π₯ RETURN π₯
0 on success, or a negative errno code otherwise π (that's the "something went sideways" branch, we don't love her but she exists)
π SEE ALSO π
- kernel file
./drivers/gpu/drm/drm_vblank_helper.c overview(9)drm_crtc_vblank_atomic_flush(9)drm_crtc_vblank_atomic_enable(9)drm_crtc_vblank_atomic_disable(9)drm_crtc_vblank_helper_disable_vblank_timer(9)drm_crtc_vblank_helper_get_vblank_timestamp_from_timer(9)
that's the whole page bestie, go forth and timer your vblanks π§β¨
cheers from ./drivers/gpu/drm β October 2026, page `drm_crtc_vbl...vblank_timer(9)**, mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms