drm_gem_fb_vmap(9)
π drm_gem_fb_vmap(9) β the kernel API manual page, bestie edition
okay so you're in the drm_gem_fb_vmap(9) era of your life and honestly? iconic. this is the kernel API manual, and we're getting you through it together π«Ά
β¨ NAME β¨
drm_gem_fb_vmap β literally maps all framebuffer BOs into kernel address space. that's the whole vibe π«
πΈ SYNOPSIS πΈ
int drm_gem_fb_vmap (struct drm_framebuffer *fb , struct iosys_map *map
, struct iosys_map *data );
π ARGUMENTS π
fbβ the framebuffer bestie. the main character.mapβ returns the mapping's address for each BO β¨dataβ returns the data address for each BO, and yes it can beNULLπ
π¦ DESCRIPTION π¦
so what this function does is it maps all the buffer objects of the given framebuffer into kernel address space and stores them in struct iosys_map. slay. π
and the way it's actually kind and caring?? if the mapping operation fails for one of the BOs, the function unmaps the already-established mappings automatically. no leaks, no mess, we love a self-cleaning queen π
callers that wanna access a BO's stored data should pass data. that argument returns the addresses of the data stored in each BO. heads up though β this is different from map if the framebuffer's offsets field is non-zero. not the same thing, don't mix them up ngl π
π important vibe check: bothmapanddatamust each refer to arrays with at leastfb->format->num_planeselements. at least. do not skimp on this, fr fr.
see drm_gem_fb_vunmap for unmapping β that's the reverse-direction bestie π§
π RETURN π
0 on success, or a negative errno code otherwise. that's it, that's the tea β
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_gem_framebuffer_helper.coverview(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_vunmap(9)drm_gem_fb_begin_cpu_access(9)drm_gem_fb_end_cpu_access(9)drm_gem_fb_afbc_init(9)
and that's the whole page, bestie π this one lives in ./drivers/gpu/drm, dated October 2026, and it goes by drm_gem_fb_vmap(9) β go forth and map those BOs, you've got this πβ¨
π¦ 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