STRUCT DRM_FB_HELPER_SURFACE_SIZE(9)
π 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 π
- Kernel file
./include/drm/drm_fb_helper.h struct drm_fb_helper_funcs(9)struct drm_fb_helper(9)DRM_FB_HELPER_DEFAULT_OPS(9)
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
- 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