drm_calc_ti...ng_constants(9)
π drm_calc_timestamping_constants β Kernel API Manual (section 9)
okay so bestie, buckle up, we're in the Kernel API Manual today and the star of the show is drm_calc_timestamping_constants β¨
πΈ NAME πΈ
drm_calc_timestamping_constants β literally just calculating vblank timestamp constants, no biggie π
π SYNOPSIS π
void drm_calc_timestamping_constants (struct drm_crtc *crtc , const
struct drm_display_mode *mode );
she takes two args and returns void, iykyk π«Ά
π¦ ARGUMENTS π¦
crtcβ thedrm_crtcwhose timestamp constants should be updated. yes, that one, the one you're pointing at πmodeβ the display mode containing the scanout timings. it's giving "where do I get the numbers from" energy π
β¨ DESCRIPTION β¨
so what she does is calculate and store various constants which are later needed by vblank and swap-completion timestamping β e.g., by drm_crtc_vblank_helper_get_vblank_timestamp π₯
and the slay part? these constants are derived from the CRTC's true scanout timing, so they take things like panel scaling or other adjustments into account π no cap, she's thorough.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_vblank.cβvblank handling(9) drm_crtc_accurate_vblank_count(9)drm_vblank_init(9)drm_dev_has_vblank(9)drm_crtc_vblank_waitqueue(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_vblank_count_and_time(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)
like, that's the whole vblank friend group right there ππ«Ά go read them, they all ate π
this page lives in ./drivers/gpu/drm, dated October 2026, and yes the header up top and the footer at the bottom are the same drm_calc_timestamping_constants(9) β iconic, consistent, periodt π
π¦ 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