drm_mode_vrefresh(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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:

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