STRUCT DRM_FB_HELPER_SURFACE_SIZE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_fb_helper_surface_size β€” NAME ✨

okay so bestie, <purple>struct drm_fb_helper_surface_size</purple> is literally the struct that describes fbdev size and scanout surface size. that's the whole vibe. this is from the Kernel API Manual, and we're gonna get into it πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_fb_helper_surface_size {
    u32 fb_width;
    u32 fb_height;
    u32 surface_width;
    u32 surface_height;
    u32 surface_bpp;
    u32 surface_depth;
 };

no cap, that's the whole shape of it. let's meet the members πŸ’–

🌸 Members 🌸

  • fb_width β€” the fbdev width, bestie. that's it, that's the field 🫢
  • fb_height β€” the fbdev height. iconic. ✨
  • surface_width β€” the width of the scanout buffer πŸ‘‘
  • surface_height β€” the height of the scanout buffer πŸ‘‘
  • surface_bpp β€” the bpp of the scanout buffer, yes literally πŸ“
  • surface_depth β€” the depth of the scanout buffer 🌈

⭐ Description ⭐

okay so here's the part you actually need to know, and it's giving important πŸ’€

note that the scanout surface width/height may be larger than the fbdev width/height. not a typo, not a bug, that's just how it is.

in the case of multiple displays, the scanout surface gets sized according to the largest width/height β€” so it's large enough for all the CRTCs to scanout. slay, everything fits πŸ’…

but the fbdev width/height? that gets sized to the minimum width/height of all the displays. why? because this ensures that fbcon fits on the smallest of the attached displays 🧚 so the tiny monitor doesn't get left out, periodt.

also like, fb_width/fb_height is used by drm_fb_helper_fill_info to fill out the fb_info.var structure. iykyk πŸ”₯


πŸŽ€ SEE ALSO πŸŽ€


and that's the tea, bestie πŸ“ this whole thing lives in ./include/drm, from the October 2026 era of the Kernel API Manual, filed under struct drm_...surface_size(9) β€” mwah, go read the other ones too πŸ’œπŸ¦‹

πŸ“¦ where this page comes from