drm_gem_dest..._plane_state(9)
π drm_gem_destroy_shadow_plane_state(9) β kernel API manual, bestie edition
okay so this is a page from the Kernel API Manual (drm_gem_dest..._plane_state(9), yes the title is lowkey truncated, we don't talk about it π) and it's literally all about one little cleanup function. short page, big "i'm the one who tidies up after the party" energy. let's get into it π§Ήβ¨
πΈ NAME πΈ
drm_gem_destroy_shadow_plane_state β deletes shadow-buffered plane state. that's it. that's the whole job. it's giving "designated cleanup bestie" π«Ά
β¨ SYNOPSIS β¨
void drm_gem_destroy_shadow_plane_state (struct drm_plane *plane ,
struct drm_plane_state *plane_state );
no return value, void, nothing to catch, she just does her thing and dips π
π ARGUMENTS π
planeβ the plane. the actual plane. the main character, honestly πplane_stateβ the plane state, and it's of typestruct drm_shadow_plane_state. don't try to hand her some other state type, she knows π§
π¦ DESCRIPTION π¦
so what does she actually do?? this function implements struct drm_plane_funcs.atomic_destroy_state for shadow-buffered planes. yep, that's her whole rΓ©sumΓ© π
and here's the important bit, the vibe check, the fine print: it expects that mappings of shadow buffers have been released already. like, already released. past tense. done. if you roll up to this function with your shadow buffer mappings still hanging around, that's on you, not on her π so release those mappings first, then call her. in that order. no cap.
π₯ SEE ALSO π₯
the whole friend group, fr fr π«Ά go read these too:
- Kernel file
./drivers/gpu/drm/drm_gem_atomic_helper.c overview(9)drm_gem_plane_helper_prepare_fb(9)__drm_gem_duplicate_shadow_plane_state(9)drm_gem_duplicate_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)
and that's the page!! π this iconic little number lives in ./drivers/gpu/drm and is dated October 2026, so go forth, release your shadow buffer mappings, and call her responsibly πβ¨π·
π¦ 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