drm_crtc_wait_one_vblank(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 ⭐

  • 0 on success πŸŽ‰
  • negative error on failures πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/gpu/drm/drm_vblank.c β€” vblank handling(9), plus the whole friend group πŸ‘‘:


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