drm_crtc_se...vblank_count(9)
π drm_crtc_set_max_vblank_count(9) π
okay so bestie, this is a page straight out of the Kernel API Manual β yes, the big serious one β and today's main character is drm_crtc_set_max_vblank_count. it's giving "small function, very specific job" and honestly? iconic. π
β¨ NAME β¨
drm_crtc_set_max_vblank_count β configure the hw max vblank counter value π¦
πΈ SYNOPSIS πΈ
void drm_crtc_set_max_vblank_count (struct drm_crtc *crtc , u32
max_vblank_count );
lowkey just two args, no drama, no return value. we love a void function that minds its own business. π
π«Ά ARGUMENTS π«Ά
crtcβ the CRTC in question. like, which one are we talking about, bestie? this one. πmax_vblank_countβ the max hardware vblank counter value. that's the number. that's the whole vibe. β
π₯ DESCRIPTION π₯
So here's the tea: this function updates the maximum hardware vblank counter value for crtc at runtime. runtime, bestie β not at init, not at probe, at runtime. π
It's useful for hardware where how the hardware vblank counter behaves depends on which display configuration is currently active. like, the counter's whole personality changes depending on what's plugged in and turned on. π
For example β and this is the example, fr fr β if the hardware vblank counter does not work when a specific connector is active, the maximum can be set to zero. and when that specific connector isn't active, the maximum can again be set to the appropriate non-zero value. zero when it's broken, non-zero when it's fine, everyone slays in their own lane. β¨
π¨ important, no cap: if you use this, it must be called before drm_vblank_on. that's not a suggestion, that's the law. π
π SEE ALSO π
the whole friend group, in order, exactly as listed, no one left behind π«Ά:
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_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_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_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)
and that's the page, bestie π that's it, that's the whole thing β short, sweet, and aggressively specific about when you're allowed to call it.
mwah π
β xoxo, your girl, coming to you from ./drivers/gpu/drm, dated October 2026 ππ¦β¨
π¦ 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