drm_atomic_h..._for_vblanks(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_atomic_helper_wait_for_vblanks ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– this one's a DRM atomic helper, and it's literally just "hey, wait for the screen to actually refresh before you yeet the old buffers." iconic behaviour, honestly.


🌸 NAME 🌸

drm_atomic_helper_wait_for_vblanks β€” wait for vblank on CRTCs

like. the whole personality is in that one line tbh.


πŸŽ€ SYNOPSIS πŸŽ€

void drm_atomic_helper_wait_for_vblanks (struct drm_device *dev , struct
drm_atomic_commit *state );

no return value, no drama, just vibes and blocking πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the DRM device. the main character, the whole setup, the hardware of it all 🫢
  • state β€” the atomic state object being committed. this is the moment, this is the commit, this is her ✨

πŸ’œ DESCRIPTION πŸ’œ

okay so picture this: you've just done the atomic commit, and now this helper waits for vblanks on all affected CRTCs. and yes, "all affected" means before you go cleaning up old framebuffers with drm_atomic_helper_cleanup_planes β€” order matters, bestie, do not skip ahead 😭

and the way it's optimized?? it will literally only wait on CRTCs where the framebuffers have actually changed. no wasted waits, no extra blocking. that's specifically so the legacy cursor and plane update use-case stays fast. main character energy for legacy support ngl πŸ“

also important: if your driver uses the nonblocking commit tracking support that gets initialized by calling drm_atomic_helper_setup_commit, you should go look at drm_atomic_helper_wait_for_flip_done instead. that's your function, this one's not it πŸ’€ (affectionately)

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/gpu/drm/drm_atomic_helper.c, and overview(9), plus the whole friend group:

like. that's the entire friend group chat right there, no cap 🌈


kisses bestie, go wait for those vblanks πŸ’–

this one lives at ./drivers/gpu/drm, dated October 2026 β€” that's the source and the version-of-record, and yes it's giving "filed under drivers/gpu/drm forever" πŸŽ€βœ¨

πŸ“¦ where this page comes from