drm_gem_fb_c...e_with_funcs(9)
π NAME π
so like, the star of the show is drm_gem_fb_create_with_funcs β the helper function for the &drm_mode_config_funcs.fb_create callback β¨ (yes bestie, that's the whole vibe)
this page is living in the Kernel API Manual, and the header line up top is literally / drm_gem_fb_c...e_with_funcs(9) / β the terminal did a little truncation moment, we don't judge π
β¨ SYNOPSIS β¨
struct drm_framebuffer * drm_gem_fb_create_with_funcs (struct drm_device
*dev , struct drm_file *file , const struct drm_format_info *info ,
const struct drm_mode_fb_cmd2 *mode_cmd , const struct
drm_framebuffer_funcs *funcs );
like, five args, one struct pointer return, no cap π«Ά
π¦ ARGUMENTS π¦
devβ the DRM device, obvs πfileβ the DRM file that holds the GEM handle(s) backing the framebuffer β imagine it's the friend group chat that's keeping the handles safe πinfoβ pixel format information, iykyk πmode_cmdβ the metadata straight from the userspace framebuffer creation request, like the ones sliding into your inbox πΈfuncsβ the vtable to be used for the new framebuffer object β yes queen, you get to hand-pick the callback squad π
π DESCRIPTION π
okay so here's the tea β β this function can be used to set drm_framebuffer_funcs for drivers that need custom framebuffer callbacks π₯. if you don't need to change drm_framebuffer_funcs, just use drm_gem_fb_create instead, simple as that bestie π
and the function does buffer size validation β it's giving responsible main character energy, it's checking its own work, we love to see it β
π RETURN π
- pointer to a
drm_framebufferon success π - or an error pointer on failure π (it happens, we recover)
π SEE ALSO π
the kernel file ./drivers/gpu/drm/drm_gem_framebuffer_helper.c is the whole overview(9) moment, and then the entire cinematic universe:
drm_gem_fb_get_obj(9)drm_gem_fb_destroy(9)drm_gem_fb_create_handle(9)drm_gem_fb_init_with_funcs(9)drm_gem_fb_create(9)drm_gem_fb_create_with_dirty(9)drm_gem_fb_vmap(9)drm_gem_fb_vunmap(9)drm_gem_fb_begin_cpu_access(9)drm_gem_fb_end_cpu_access(9)drm_gem_fb_afbc_init(9)
like literally the whole friend group showed up to the party π§π
mwah π sending u off β this page came from ./drivers/gpu/drm, dated October 2026, and it's filed under drm_gem_fb_c...e_with_funcs(9) (yes, still truncated, still iconic). bye bestie, go validate some buffer sizes π«Άβ¨
π¦ 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