of_get_fb_videomode(9)
β¨ NAME β¨
of_get_fb_videomode β get a fb_videomode from devicetree π
okay bestie, welcome to the Kernel API Manual β this one is short but lowkey important, and it's all about pulling a video mode out of devicetree. slay.
πΈ SYNOPSIS πΈ
int of_get_fb_videomode (struct device_node *np , struct fb_videomode
*fb , int index );
π ARGUMENTS π
npβ thedevice_nodewith the timing specification, iykyk. it's the devicetree node you're getting the timing info from.fbβ will be set to the return value. yes, that's literally the whole job. π«Άindexβ the index into the list of display timings in devicetree. pick your mode, bestie.
π¦ DESCRIPTION π¦
so this function is expensive π β not like "oops my coffee was $9" expensive, but like "don't call it in a loop for no reason" expensive. only use it if only one mode is to be read from DT. one. single. mode. periodt.
if you need multiple modes, start with of_get_display_timings ond work with that instead. yep, that's the vibe β use the bigger tool for the bigger job. π
π¨ reminder bestie: this function is expensive and should only be used if only one mode is to be read from DT. for multiple modes, start with of_get_display_timings ond work with that instead. no cap.
π SEE ALSO π
- Kernel file
./drivers/video/fbdev/core/fbmon.c fb_create_modedb(9)fb_destroy_modedb(9)fb_get_vblank(9)fb_get_hblank_by_hfreq(9)fb_get_hblank_by_dclk(9)fb_get_hfreq(9)
mwah π this lil page lives under ./drivers/video/fbdev/core, is dated October 2026, and it's the of_get_fb_videomode(9) page. iconic. πβ¨
π¦ 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