drm_gem_fb_vmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 be NULL πŸ™ˆ

πŸ¦‹ 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: both map and data must each refer to arrays with at least fb->format->num_planes elements. 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 πŸ‘‘


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