drm_gem_pla...r_prepare_fb(9)
β¨ drm_gem_plane_helper_prepare_fb β¨
okay so bestie, we're in the Kernel API Manual today and this page is literally about drm_gem_plane_helper_prepare_fb β it's giving "prepare a GEM backed framebuffer" energy and honestly? iconic. π
π NAME
drm_gem_plane_helper_prepare_fb β Prepare a GEM backed framebuffer
πΈ SYNOPSIS
int drm_gem_plane_helper_prepare_fb (struct drm_plane *plane , struct
drm_plane_state *state );
π¦ ARGUMENTS
planeβ the Plane, yes ma'am, that's the one πstateβ the Plane state that the fence is gonna get attached to π«Ά
π DESCRIPTION
okay so here's the tea, bestie: this function extracts the exclusive fence out of drm_gem_object.resv and attaches it to the plane state, so the atomic helper can wait on it. lowkey essential stuff.
and why do we care?? because that's literally necessary to correctly implement implicit synchronization for any buffers shared as a struct dma_buf. no cap, fr fr. π
you can use this function as the drm_plane_helper_funcs.prepare_fb callback. slay.
also!! good news for the simple GEM based framebuffer drivers whose buffers are always pinned in memory β you do not need the drm_plane_helper_funcs.cleanup_fb hook. not me saving you a whole callback ππ«Ά
and finally, for GEM drivers this function is the default implementation of drm_plane_helper_funcs.prepare_fb if no callback is provided. main character default behaviour, honestly. β
π₯ SEE ALSO
Kernel file ./drivers/gpu/drm/drm_gem_atomic_helper.c β plus the whole friend group, all of these:
overview(9)__drm_gem_duplicate_shadow_plane_state(9)drm_gem_duplicate_shadow_plane_state(9)__drm_gem_destroy_shadow_plane_state(9)drm_gem_destroy_shadow_plane_state(9)__drm_gem_reset_shadow_plane(9)drm_gem_reset_shadow_plane(9)drm_gem_begin_shadow_fb_access(9)drm_gem_end_shadow_fb_access(9)drm_gem_simple_kms_begin_shadow_fb_access(9)drm_gem_simple_kms_end_shadow_fb_access(9)drm_gem_simple_kms_reset_shadow_plane(9)drm_gem_simple_kms_duplicate_shadow_plane_state(9)drm_gem_simple_kms_destroy_shadow_plane_state(9)
ngl bestie this whole thing lives in ./drivers/gpu/drm and it's dated October 2026 β so go forth, attach that fence, and remember: the vibe check is atomic πβ¨
later bestie, go ship some correct implicit sync π§π
π¦ 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