of_get_fb_videomode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 β€” the device_node with 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 πŸ‘€


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