drm_vblank_count_and_time(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_vblank_count_and_time(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes, that's the manual name, we're in the kernel docs now and honestly? it's giving backstage pass energy πŸŽ€


✨ NAME ✨

drm_vblank_count_and_time β€” grab the "cooked" vblank counter value and the system timestamp that matches that counter value. two-for-one deal, we love to see it 🫢


✨ SYNOPSIS ✨

u64 drm_vblank_count_and_time (struct drm_device *dev , unsigned int
pipe , ktime_t *vblanktime );

✨ ARGUMENTS ✨

  • dev β€” the DRM device. like, the whole main character of this operation πŸ‘‘
  • pipe β€” index of the CRTC whose counter you want. yes, that CRTC, you know the one 🌸
  • vblanktime β€” pointer to a ktime_t that receives the vblank timestamp. it's the little mailbox where the answer gets dropped off πŸ’Œ

✨ DESCRIPTION ✨

So what this does is it fetches the "cooked" vblank count value β€” and bestie, that number represents how many vblank events have happened since the system was booted, including lost events due to modesetting activity 😭 (yes, the lost ones still count, they're not forgotten, they're cooked in πŸ”₯).

It also returns the corresponding system timestamp β€” specifically the time of the vblank interval that matches the current vblank counter value ⭐

And a lil heads up: this is the legacy version of drm_crtc_vblank_count_and_time. legacy! iconic! but legacy πŸ’… iykyk


✨ SEE ALSO ✨


ngl that's a lot of siblings in the SEE ALSO list β€” every single one of them is here tho, no gatekeeping in this house πŸ¦‹

aight that's the whole page, mwah πŸ’‹ this came from ./drivers/gpu/drm, dated October 2026 β€” go forth and count those vblanks, bestie, you're gonna slay πŸŒˆβœ¨πŸ’œ

πŸ“¦ where this page comes from