drm_gem_fb_create_handle(9)
π drm_gem_fb_create_handle(9) π
okay so bestie, welcome to the Kernel API Manual β today's main character is drm_gem_fb_create_handle, and honestly? she's a little legend. let's get into it β¨
πΈ NAME πΈ
drm_gem_fb_create_handle β Create handle for GEM backed framebuffer π
β¨ SYNOPSIS β¨
int drm_gem_fb_create_handle (struct drm_framebuffer *fb , struct
drm_file *file , unsigned int *handle );
like, that's the whole signature. she's not complicated, she's just efficient π
π«Ά ARGUMENTS π«Ά
fbβ the Framebuffer. the vibes we're building a handle for πfileβ the DRM file you wanna register the handle for. yes, that file. πhandleβ pointer where we drop the created handle on the way out. she's an out-param, she's giving β¨ output β¨ π
π¦ DESCRIPTION π¦
so basically, this function creates a handle for the GEM object that's backing the framebuffer. that's it, that's the whole job, and she ate π
drivers can literally just use this as their drm_framebuffer_funcs->create_handle callback β plug and play, no cap π₯
and who calls in? the GETFB IOCTL calls into this callback. so when userspace comes knocking with GETFB, this is the girl answering the door πͺβ¨
β RETURN β
0 on success, or a negative error code on failure π that's it, that's the contract, periodt π
π§ 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_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)
the whole friend group fr fr π«Άβ¨ go read them, they're all iconic π
ngl bestie, this one's short but she's important β if you're writing a driver and you need that create_handle callback, you already know. iykyk π
and that's a wrap! page brought to you by ./drivers/gpu/drm, dated October 2026 β mwah, love u, 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