drm_crtc_vblank_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_crtc_vblank_count(9) πŸ’–

okay so bestie, we are in the Kernel API Manual and today's main character is drm_crtc_vblank_count(9). it's a tiny little vblank counter getter and it has lore. ✨


πŸŽ€ NAME πŸŽ€

drm_crtc_vblank_count β€” retrieve the "cooked" vblank counter value. πŸ“

🌸 SYNOPSIS 🌸

u64 drm_crtc_vblank_count (struct drm_crtc *crtc );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • crtc β€” which counter to retrieve. yes, which one. choose ur fighter. πŸ’…

✨ DESCRIPTION ✨

this function fetches the "cooked" vblank count value. that value represents the number of vblank events since the system was booted, including lost events due to modesetting activity. πŸ‘‘

note: this timer isn't correct against a racing vblank interrupt (since it only reports the software vblank counter). see drm_crtc_accurate_vblank_count for such use-cases. 😭

Also, for a given vblank counter value, drm_crtc_handle_vblank and drm_crtc_vblank_count or drm_crtc_vblank_count_and_time provide a barrier: any writes done before calling drm_crtc_handle_vblank will be visible to callers of the later functions, if the vblank count is the same or a later one. 🫢

see also drm_vblank_crtc.count. πŸ‘€

πŸ”₯ RETURN πŸ”₯

the software vblank counter. periodt. πŸ’–

🌈 SEE ALSO 🌈

okay bestie, the vblank cinematic universe is huge, here's the whole friend group:

mwah πŸ’‹ that's the whole page. it's from the Kernel API Manual, source ./drivers/gpu/drm, dated October 2026, and yes the title is drm_crtc_vblank_count(9). love u, go count some vblanks responsibly! 🫢✨

πŸ“¦ where this page comes from