drm_framebuffer_lookup(9)
π drm_framebuffer_lookup(9) π
okay so first things first β bestie, you're reading the Kernel API Manual page for drm_framebuffer_lookup, and honestly? it's a short one but she matters. let's get into it π«Ά
β¨ NAME β¨
drm_framebuffer_lookup β the girlies call it "look up a drm framebuffer and grab a reference" and that's literally what it does, no cap π
πΈ SYNOPSIS πΈ
struct drm_framebuffer * drm_framebuffer_lookup (struct drm_device *dev
, struct drm_file *file_priv , uint32_t id );
like... that's her signature. that's the whole vibe. copy it exactly, don't @ me π
π ARGUMENTS π
devβ the drm device, the main character of this whole operation πfile_privβ the drm file we're checking for a lease against. yes, against. it's giving background check energy πidβ the id of the fb object. the fb in question. the one we're looking up π―
π DESCRIPTION π
so here's the tea β β if this call succeeds, it grabs an additional reference to the framebuffer. like, it takes hold of it and goes "mine now, kinda" π
and because of that, callers need to make sure they eventually unreference the returned framebuffer again, using drm_framebuffer_put. this is not optional, bestie, this is the whole deal β you took a reference, you give it back π«Ά
β οΈ fr fr: don't forget the drm_framebuffer_put. leaking a reference is not the slay you think it is. it's giving memory leak π
π¦ SEE ALSO π¦
the whole friend group, assembled π:
- Kernel file
./drivers/gpu/drm/drm_framebuffer.coverview(9) drm_mode_addfb(9)drm_mode_addfb2(9)drm_mode_rmfb(9)drm_mode_getfb(9)drm_mode_getfb2_ioctl(9)drm_mode_dirtyfb_ioctl(9)drm_fb_release(9)drm_framebuffer_init(9)drm_framebuffer_unregister_private(9)drm_framebuffer_cleanup(9)drm_framebuffer_remove(9)
and that's the page, gorgeous β¨ this lil number lives in ./drivers/gpu/drm, dated October 2026, and she's filed under drm_framebuffer_lookup(9). go forth and put your references back where they belong πππ§
π¦ 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