drm_mode_legacy_fb_format(9)
π 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 π¦
- Kernel file
./drivers/gpu/drm/drm_fourcc.cβ the actual source, if you wanna go read the receipts π drm_driver_legacy_fb_format(9)drm_driver_color_mode_format(9)drm_format_info(9)drm_get_format_info(9)drm_format_info_block_width(9)drm_format_info_block_height(9)drm_format_info_bpp(9)drm_format_info_min_pitch(9)
the whole format-info friend group, plus the driver-level legacy/colour-mode counterparts. iconic lineup, go read them all. π
quick reminder bestie: thebpp/depthpairing 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
- 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