drm_gem_vram...r_prepare_fb(9)
π drm_gem_vram_plane_helper_prepare_fb(9) π
okay bestie, welcome to the Kernel API Manual β yes, the actual kernel, yes we're doing this, and yes you're gonna get it π«Ά
β¨ NAME β¨
drm_gem_vram_plane_helper_prepare_fb β the function that implements &struct drm_plane_helper_funcs.prepare_fb π
Like, that's literally its whole job description. It's the one holding down that struct slot.
πΈ SYNOPSIS πΈ
int drm_gem_vram_plane_helper_prepare_fb (struct drm_plane *plane ,
struct drm_plane_state *new_state );
bestie it takes two args and gives you back an int. that's the whole vibe β¨
π ARGUMENTS π
planeβ a DRM plane π yep, that's the whole description, it's a DRM plane, we love a low-effort queennew_stateβ the plane's new state π¦ like the glow-up version of the plane, the one it's about to become
π DESCRIPTION π
so during plane updates, this function has two jobs and it does them both in one breath:
- it sets the plane's fence βοΈ
- it pins the GEM VRAM objects of the plane's new framebuffer to VRAM π
no cap, that's it. that's the function. and listen β when you're done with those pinned objects, you gotta call drm_gem_vram_plane_helper_cleanup_fb to unpin them. like, that's not optional, that's the other half of the deal, don't leave your pins hanging π
π₯ RETURN π₯
0 on success π or a negative errno code otherwise π (if you see a negative number, something went sideways, that's the vibe check failing)
π SEE ALSO π
the whole friend group, fr fr π«Ά:
- Kernel file
./drivers/gpu/drm/drm_gem_vram_helper.c overview(9)drm_gem_vram_create(9)drm_gem_vram_put(9)drm_gem_vram_offset(9)drm_gem_vram_vmap(9)drm_gem_vram_vunmap(9)drm_gem_vram_fill_create_dumb(9)drm_gem_vram_object_free(9)drm_gem_vram_driver_dumb_create(9)drm_gem_vram_plane_helper_cleanup_fb(9)drm_gem_vram_object_vmap(9)drm_gem_vram_object_vunmap(9)drm_vram_mm_debugfs_init(9)drmm_vram_helper_init(9)drm_vram_helper_mode_valid(9)
ngl bestie, this page is short but it ate. go pin your VRAM and remember to clean up π
mwah, that's a wrap π this lil page lives in ./drivers/gpu/drm, and it's dated October 2026 β so it's from the future, main character energy honestly. it's drm_gem_vram...r_prepare_fb(9), and yes the title got cute-truncated, that's just how the header rolls π
π¦ 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