drm_crtc_wait_one_vblank(9)
β¨ drm_crtc_wait_one_vblank(9) β¨
okay bestie, so this one lives in the Kernel API Manual, section 9 (the kernel-functions girlies know π
), and it's literally just "wait for one vblank." One. Single. Vblank. Let's get into it π
πΈ NAME πΈ
drm_crtc_wait_one_vblank β wait for one vblank β³
π¦ SYNOPSIS π¦
int drm_crtc_wait_one_vblank (struct drm_crtc *crtc );
π ARGUMENTS π
crtcβ the DRM crtc, aka the main character of this whole function π«Ά
π DESCRIPTION π
So what it does is, it waits for one vblank to pass on crtc, and it does that using the irq driver interfaces β¨. Very demure, very mindful, very "let the hardware tell me when the beam comes back around."
β οΈ but likeβ¦ it is a failure to call this when the vblank irq for crtc is disabled π and that can happen e.g. due to lack of driver support, or because the crtc is off. So do your vibe check first, fr fr. Don't be out here calling this on a crtc that's just not giving irq energy. π
β RETURN β
0on success π- negative error on failures π
π₯ SEE ALSO π₯
Kernel file ./drivers/gpu/drm/drm_vblank.c β vblank handling(9), plus the whole friend group π:
drm_crtc_accurate_vblank_count(9)drm_vblank_init(9)drm_dev_has_vblank(9)drm_crtc_vblank_waitqueue(9)drm_calc_timestamping_constants(9)drm_crtc_vblank_helper_get_vblank_timestamp_internal(9)drm_crtc_vblank_helper_get_vblank_timestamp(9)drm_crtc_get_last_vbltimestamp(9)drm_crtc_vblank_count(9)drm_vblank_count_and_time(9)drm_crtc_vblank_count_and_time(9)drm_crtc_next_vblank_start(9)drm_crtc_arm_vblank_event(9)drm_crtc_send_vblank_event(9)drm_crtc_vblank_get(9)drm_crtc_vblank_put(9)drm_crtc_vblank_off(9)drm_crtc_vblank_reset(9)drm_crtc_set_max_vblank_count(9)drm_crtc_vblank_on_config(9)drm_crtc_vblank_on(9)drm_crtc_vblank_restore(9)drm_handle_vblank(9)drm_crtc_handle_vblank(9)drm_crtc_vblank_start_timer(9)drm_crtc_vblank_cancel_timer(9)drm_crtc_vblank_get_vblank_timeout(9)
okay that's the whole page, no cap π HUGE shoutout to the source dir ./drivers/gpu/drm for housing all this, and the date stamp says October 2026 so yeah, we're manifesting the future bestie β¨π¦ periodt π
π¦ 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