drm_gem_fb_get_obj(9)
π drm_gem_fb_get_obj(9) β get the GEM object that's backing your framebuffer π
okay so bestie, this is a page from the Kernel API Manual, and it's about one tiny little helper that's lowkey doing main character work behind the scenes. π
β¨ NAME β¨
drm_gem_fb_get_obj β get the GEM object backing the framebuffer π¦
πΈ SYNOPSIS πΈ
struct drm_gem_object * drm_gem_fb_get_obj (struct drm_framebuffer *fb ,
unsigned int plane );
like, you hand it a framebuffer and a plane index, and it hands you back the pointer. simple as that, no cap. β¨
π ARGUMENTS π
fbβ the framebuffer. yeah. that one. πΌοΈplaneβ the plane index. which plane are we talking about, bestie? π
π«Ά DESCRIPTION π«Ά
okay so here's the thing that actually matters: this function does not take any additional reference beyond the one that the drm_frambuffer already holds. π like, it does not bump the refcount for you. the framebuffer's already holding that reference, so you're just borrowing the pointer. no extra credit, no extra ref, periodt.
β RETURN β
it gives you back a pointer to drm_gem_object for the given framebuffer and plane index β or NULL if it does not exist. π so yeah, check for the NULL, bestie, it's giving "might not be there" energy.
π§ SEE ALSO π§
the whole friend group, honestly π:
- Kernel file
./drivers/gpu/drm/drm_gem_framebuffer_helper.coverview(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)drm_gem_fb_afbc_init(9)
ngl this one's short but it ate. know your refcounts, know your planes, and always check for NULL. π
πΈ that's the whole vibe, bestie β brought to you by ./drivers/gpu/drm, October 2026, and this lil' drm_gem_fb_get_obj(9) moment. slay, bye! π
β¨
π¦ 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