drm_gem_fb_init_with_funcs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ‘€


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