drm_gem_fb_init_with_funcs(9)
π
drm_gem_fb_init_with_funcs(9) β Kernel API Manual energy π
β¨ NAME β¨
drm_gem_fb_init_with_funcs β okay bestie, this is the helper function for implementing &drm_mode_config_funcs.fb_create callback in cases when the driver allocates a subclass of struct drm_framebuffer. π
π οΈ SYNOPSIS π οΈ
int drm_gem_fb_init_with_funcs (struct drm_device *dev , struct
drm_framebuffer *fb , struct drm_file *file , const struct
drm_format_info *info , const struct drm_mode_fb_cmd2 *mode_cmd , const
struct drm_framebuffer_funcs *funcs );
π ARGUMENTS π
devβ the DRM device, bestie. π«Άfbβ the framebuffer object, literally the main character here. β¨fileβ the DRM file that holds the GEM handle(s) backing the framebuffer.infoβ pixel format information. πmode_cmdβ metadata from the userspace framebuffer creation request.funcsβ vtable to be used for the new framebuffer object.
π DESCRIPTION π
Okay so 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, use drm_gem_fb_create instead β easy. πΈ
The function does buffer size validation. But here's the tea: the buffer size validation is for a general case, though, so users should pay attention to the checks being appropriate for them or, at least, non-conflicting. No cap, it's giving "general-purpose check, not a custom-fit." π
π¦ RETURN π¦
Zero or a negative error code. That's it, periodt. β¨
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_gem_framebuffer_helper.coverview(9) drm_gem_fb_get_obj(9)drm_gem_fb_destroy(9)drm_gem_fb_create_handle(9)drm_gem_fb_create_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)
That's the whole vibe, bestie. This page is signed off from ./drivers/gpu/drm πΈ, dated October 2026, for drm_gem_fb_init_with_funcs(9). Mwah π
π¦ 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