drm_mode_vrefresh(9)
πΈ drm_mode_vrefresh(9) πΈ
ok so this is a page straight out of the Kernel API Manual and honestly bestie, it's a little one but it's a vibe π
it lives in ./drivers/gpu/drm/drm_modes.c and it does exactly one thing, but it does it flawlessly.
β¨ NAME β¨
drm_mode_vrefresh β get the vrefresh of a mode π₯οΈβ¨
like. that's it. that's the whole job. and she ate.
π SYNOPSIS π
int drm_mode_vrefresh (const struct drm_display_mode *mode );
one function, one argument, returns an int. no cap, that's the whole signature π₯
π¦ ARGUMENTS π¦
modeβ a mode. yes, that's the description. the mode. the mode. the one you're passing in. lowkey iconic that they didn't elaborate π«Ά
π RETURN π
returns the mode's vrefresh rate in Hz, rounded to the nearest integer π
so like β no decimals, no "roughly", no "about", she's giving you a whole number and she's giving it precisely. round round round, nearest integer, periodt β
π SEE ALSO π
ok bestie buckle up, this is the long part, but every single one of these matters, so no skipping π this is the whole drm modes friend group and they're all linked, so here's the full roll call, exactly as it goes:
drm_mode_debug_printmodeline(9)drm_mode_create(9)drm_mode_destroy(9)drm_mode_probed_add(9)drm_analog_tv_mode(9)drm_cvt_mode(9)drm_gtf_mode_complex(9)drm_gtf_mode(9)drm_display_mode_from_videomode(9)drm_display_mode_to_videomode(9)drm_bus_flags_from_videomode(9)of_get_drm_display_mode(9)of_get_drm_panel_display_mode(9)drm_mode_set_name(9)drm_mode_get_hv_timing(9)drm_mode_set_crtcinfo(9)drm_mode_copy(9)drm_mode_init(9)drm_mode_duplicate(9)drm_mode_match(9)drm_mode_equal(9)drm_mode_equal_no_clocks(9)drm_mode_equal_no_clocks_no_stereo(9)drm_mode_validate_driver(9)drm_mode_validate_size(9)drm_mode_validate_ycbcr420(9)drm_mode_prune_invalid(9)drm_mode_compare(9)drm_mode_sort(9)drm_connector_list_update(9)drm_mode_parse_command_line_for_connector(9)drm_mode_create_from_cmdline_mode(9)drm_mode_convert_to_umode(9)drm_mode_convert_umode(9)drm_mode_is_420_only(9)drm_mode_is_420_also(9)drm_mode_is_420(9)drm_set_preferred_mode(9)
and the kernel file she actually lives in:
./drivers/gpu/drm/drm_modes.c
π real talk though: the whole see-also list is basically the entire mode-handling squad, so if you're poking at drm_mode_vrefresh you're probably gonna meet at least a few of them. iykyk.
that's the page!! short, sweet, does exactly what it says on the tin π
signing off from ./drivers/gpu/drm, dated October 2026 β mwah, love u, go call drm_mode_vrefresh responsibly π§πβ¨
π¦ 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