drm_format_info_bpp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_format_info_bpp (9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: you're deep in DRM land, you've got a pixel format info struct in your hands, and you just NEED to know how many bits one single pixel is eating. that's literally this function. it's the bits-per-pixel girlie. no cap. ✨


🌸 NAME 🌸

drm_format_info_bpp β€” number of bits per pixel πŸ’–


✨ SYNOPSIS ✨

unsigned int drm_format_info_bpp (const struct drm_format_info *info ,
       int plane );

like, she takes two things and gives you back an unsigned int. simple. iconic. periodt. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • info β€” the pixel format info πŸŽ€ (yes the const struct drm_format_info * one, you already know)
  • plane β€” the plane index 🌈 (which plane we're talking about, bestie)

πŸ’€ RETURN πŸ’€

the actual number of bits per pixel β€” and lowkey the important part: it depends on the plane index πŸ‘‘ so don't come for her assuming it's one fixed number, because it's giving "it depends" energy and that's valid.


πŸ‘€ SEE ALSO πŸ‘€

the kernel file ./drivers/gpu/drm/drm_fourcc.c is where the magic lives, and then the whole friend group:

go read them, iykyk πŸ’…


ngl there are no options, no env vars, no exit statuses on this one β€” she's a tiny little helper and she knows it. 🧚

and that's the whole page, bestie!! this cutie lives in ./drivers/gpu/drm, she's dated October 2026, and she goes by drm_format_info_bpp(9). mwah πŸ’‹πŸ“ see you in the next manpage!! πŸ¦‹βœ¨

πŸ“¦ where this page comes from