drm_crtc_vbl...amp_internal(9)
π NAME π
okay so this page lives in the Kernel API Manual under the truncated page name drm_crtc_vbl...amp_internal(9) β yes, the header cuts it off like that, iconic π
. The actual function is drm_crtc_vblank_helper_get_vblank_timestamp_internal, and it's a precise vblank timestamp helper. That's the whole vibe: precise vblank timestamps, no cap.
β¨ SYNOPSIS β¨
bestie, here's the signature β copy it exactly and don't let autocorrect touch it:
bool drm_crtc_vblank_helper_get_vblank_timestamp_internal (struct
drm_crtc *crtc , int *max_error , ktime_t *vblank_time , bool
in_vblank_irq , drm_vblank_get_scanout_position_func
get_scanout_position );
π ARGUMENTS π
crtcβ the CRTC whose vblank timestamp you want to retrieve. main character CRTC energy.max_errorβ you tell it the desired maximum allowable error in timestamps, measured in nanosecs. On return, it contains the true maximum error of timestamp. So it's input then output; she's versatile.vblank_timeβ pointer to the time that should receive the timestamp. Basically where the answer gets dropped off. πin_vblank_irqβ true when called fromdrm_crtc_handle_vblank. Some drivers need to apply some workarounds for gpu-specific vblank irq quirks if this flag is set. important little flag.get_scanout_positionβ callback function to retrieve the scanout position. Seestruct drm_crtc_helper_funcs.get_scanout_position. She calls back, she gets position, she slays.
π¦ DESCRIPTION π¦
so what does she actually do? Implements calculation of exact vblank timestamps from given drm_display_mode timings and the current video scanout position of a CRTC. That's the core. β¨
The current implementation only handles standard video modes. For double scan and interlaced modes, the driver is supposed to adjust the hardware mode (taken from drm_crtc_state.adjusted mode for atomic modeset drivers) to match the scanout position reported. iykyk β don't expect her to magically handle every weird mode without the driver doing its part.
Note that atomic drivers must call drm_calc_timestamping_constants before enabling a CRTC. The atomic helpers already take care of that in drm_atomic_helper_calc_timestamping_constants. So like, don't forget the setup, bestie π
.
π RETURN π
Returns true on success, and false on failure, i.e. when no accurate timestamp could be acquired. periodt. If it can't get a clean timestamp, it says false β that's the whole story.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_vblank.candvblank 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(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)
okay that's the page, bestie π«Ά β source: ./drivers/gpu/drm, date: October 2026, manual page: drm_crtc_vbl...amp_internal(9). you're welcome, go get those exact vblank timestamps β¨
π¦ 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