drm_gem_begi...ow_fb_access(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this is drm_gem_begin_shadow_fb_access β€” it's from the kernel API manual (the drm_gem_begi...ow_fb_access(9) page, yes the name is truncated in the header, that's just how it's printed bestie, no cap πŸ’…) and tl;dr: it prepares shadow framebuffers for CPU access.


🌸 SYNOPSIS 🌸

int drm_gem_begin_shadow_fb_access (struct drm_plane *plane , struct
       drm_plane_state *plane_state );

like literally that's the whole signature, she's short and she knows it πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • plane β€” the plane. that's it. that's the whole description. the plane. πŸ›©οΈ
  • plane_state β€” the plane state, and it's of type struct drm_shadow_plane_state (important!! not just any plane_state, okurrr) ⭐

πŸ’– DESCRIPTION πŸ’–

so what does she actually do. This function implements struct drm_plane_helper_funcs.begin_fb_access. That's her job, that's her whole assignment, main character energy fr fr πŸ‘‘

What happens: it maps all the buffer objects of the plane's framebuffer into kernel address space and stores them in struct drm_shadow_plane_state.map. All of them. Not some. All. 🫢

Then, the first data bytes are available in struct drm_shadow_plane_state.data. cute little shortcut, we love her 🌈

πŸ’€ don't forget the cleanup bestie β€” see drm_gem_end_shadow_fb_access for that, because leaving stuff mapped is not the vibe, iykyk

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • or a negative errno code otherwise 😭 (she'll tell you what went wrong, just negatively)

πŸ‘‘ SEE ALSO πŸ‘‘

okay so the whole friend group, in order:


that's the whole page bestie, go map some framebuffers πŸ§šβ€β™€οΈβœ¨

mwah πŸ’‹ β€” this one lives in ./drivers/gpu/drm and it's stamped October 2026, so like, future-coded of her honestly πŸ“

πŸ“¦ where this page comes from