drm_mode_legacy_fb_format(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_legacy_fb_format(9) β€” the Kernel API Manual page you actually wanna read

okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is drm_mode_legacy_fb_format. it's a tiny little function, it's giving "one job and it does it," and honestly? we respect it. πŸŽ€


✨ NAME ✨

drm_mode_legacy_fb_format β€” compute a drm fourcc code from a legacy description πŸ¦‹

like, you hand it the old-school way of describing a pixel format, and it hands you back the fancy drm fourcc code. glow-up achieved, no cap.


🌸 SYNOPSIS 🌸

uint32_t drm_mode_legacy_fb_format (uint32_t bpp , uint32_t depth );

two uint32_ts walk in, one uint32_t walks out. that's the whole vibe. ✨


πŸ’– ARGUMENTS πŸ’–

  • bpp β€” bits per pixels. yes, "pixels," plural, that's literally what the page says and I'm not gonna lie to you about it. it's how many bits a pixel is packing. πŸ“
  • depth β€” bit depth per pixel. the depth-y part of the situation. πŸ’œ

πŸ‘‘ DESCRIPTION πŸ‘‘

Computes a drm fourcc pixel format code for the given bpp/depth values.

that's it. that's the whole description. it takes your legacy bpp/depth combo, does some thinking, and returns the drm fourcc pixel format code that matches. short king of a function, fr fr. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

the whole format-info friend group, plus the driver-level legacy/colour-mode counterparts. iconic lineup, go read them all. 🌈


quick reminder bestie: the bpp/depth pairing is the legacy description. this function is the translator, not the source of truth. πŸ’€

and that's the page!! πŸŽ€ brought to you from ./drivers/gpu/drm, dated October 2026, in the Kernel API Manual β€” stay slaying, stay format-correct, and remember: fourcc codes are forever. πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from