drm_gem_fb_afbc_init(9)
π drm_gem_fb_afbc_init(9) β the Kernel API Manual glow-up π
okay so bestie, this page lives in the Linux Kernel API Manual and it's literally about drm_gem_fb_afbc_init β the helper function for drivers using afbc to fill and validate all the afbc-specific struct drm_afbc_framebuffer members. no cap, that's the whole name line, we love a function that tells you its job upfront. β¨
πΈ SYNOPSIS πΈ
int drm_gem_fb_afbc_init (struct drm_device *dev , const struct
drm_format_info *info , const struct drm_mode_fb_cmd2 *mode_cmd , struct
drm_afbc_framebuffer *afbc_fb );
π¦ ARGUMENTS π¦
devβ the DRM device, your main character π«Άinfoβ pixel format information, aka the vibes of your pixelsmode_cmdβ metadata from the userspace framebuffer creation request, like the receipt for what userspace asked you to build π§Ύafbc_fbβ the afbc framebuffer itself π
π DESCRIPTION π
so this function is for drivers that support afbc and wanna finish prepping their struct drm_afbc_framebuffer. it's giving "last step, final touch, setting spray" π
important ordering note: it must be called after allocating the said struct and calling drm_gem_fb_init_with_funcs. no cutting the line, bestie, the sequence matters. β
also, heads up: it is the caller's responsibility to put afbc_fb->base.obj objects in case the call is unsuccessful. like, if this whole thing flops, you're the one cleaning up the objects β no one's gonna do it for you, so don't ghost them π
π₯ RETURN π₯
Zero on success, or a negative error value on failure. that's it, that's the whole vibe check β 0 = slay, negative = not slay π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_gem_framebuffer_helper.c overview(9)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_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)
the whole framebuffer helper friend group, fr fr π
and that's the page!! sourced from ./drivers/gpu/drm, dated October 2026, and yes the title of this little masterpiece is drm_gem_fb_afbc_init(9) β go forth and init your afbc framebuffers responsibly, bestie ππΈβ¨
π¦ 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