drm_vblank_count_and_time(9)
π 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 aktime_tthat 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 β¨
- Kernel file
./drivers/gpu/drm/drm_vblank.cvblank handling(9) 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_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_wait_one_vblank(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)
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
- 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