drm_atomic_h...eanup_planes(9)
π drm_atomic_helper_cleanup_planes(9) β the Kernel API Manual glow-up β¨
okay bestie, buckle up, because this one is a little function with a big job. It's from the Linux Kernel API Manual, it lives in ./drivers/gpu/drm, and it is literally the cleanup crew that shows up after the atomic commit party is over. π§Ήπ
πΈ NAME πΈ
drm_atomic_helper_cleanup_planes β cleanup plane resources after commit π
β¨ SYNOPSIS β¨
void drm_atomic_helper_cleanup_planes (struct drm_device *dev , struct
drm_atomic_commit *state );
like, that's the whole signature. short and iconic. π
π«Ά ARGUMENTS π«Ά
devβ the DRM device. your main character. π₯οΈstateβ the atomic state object that's being committed. the whole vibe of this operation lives in here. π¦
π DESCRIPTION π
so what does this actually do? It cleans up plane state β and specifically framebuffers β from the old configuration. Note the word old, bestie, because it matters: the old configuration has to still be preserved in state for this function to even be callable. no old config, no cleanup. that's just the rules. π
and here's the part you cannot skip, fr fr:
This function may not be called on the new state when the atomic update fails at any point after callingdrm_atomic_helper_prepare_planes. If your atomic update face-planted after that point, usedrm_atomic_helper_unprepare_planesinstead. no cap. π¨
like, that's the whole trap. wrong helper, wrong state, and things get ugly. respect the prepare/unprepare pairing and you're golden. π
π SEE ALSO π
the whole friend group π
β every single one, because they all hang out in ./drivers/gpu/drm/drm_atomic_helper.c (that's the kernel file overview, go read it, it ate):
overview(9)β Kernel file./drivers/gpu/drm/drm_atomic_helper.cdrm_atomic_helper_check_modeset(9)drm_atomic_helper_check_wb_connector_state(9)drm_atomic_helper_check_plane_state(9)drm_atomic_helper_check_crtc_primary_plane(9)drm_atomic_helper_check_planes(9)drm_atomic_helper_check(9)drm_atomic_helper_commit_encoder_bridge_disable(9)drm_atomic_helper_commit_crtc_disable(9)drm_atomic_helper_commit_encoder_bridge_post_disable(9)drm_atomic_helper_update_legacy_modeset_state(9)drm_atomic_helper_calc_timestamping_constants(9)drm_atomic_helper_commit_crtc_set_mode(9)drm_atomic_helper_commit_modeset_disables(9)drm_atomic_helper_commit_writebacks(9)drm_atomic_helper_commit_encoder_bridge_pre_enable(9)drm_atomic_helper_commit_crtc_enable(9)drm_atomic_helper_commit_encoder_bridge_enable(9)drm_atomic_helper_commit_modeset_enables(9)drm_atomic_helper_wait_for_fences(9)drm_atomic_helper_wait_for_vblanks(9)drm_atomic_helper_wait_for_flip_done(9)drm_atomic_helper_commit_tail(9)drm_atomic_helper_commit_tail_rpm(9)drm_atomic_helper_async_check(9)drm_atomic_helper_async_commit(9)drm_atomic_helper_commit(9)implementing nonblocking commit(9)drm_atomic_helper_setup_commit(9)drm_atomic_helper_wait_for_dependencies(9)drm_atomic_helper_fake_vblank(9)drm_atomic_helper_commit_hw_done(9)drm_atomic_helper_commit_cleanup_done(9)drm_atomic_helper_prepare_planes(9)drm_atomic_helper_unprepare_planes(9)drm_atomic_helper_commit_planes(9)drm_atomic_helper_commit_planes_on_crtc(9)drm_atomic_helper_disable_planes_on_crtc(9)drm_atomic_helper_swap_state(9)drm_atomic_helper_update_plane(9)drm_atomic_helper_disable_plane(9)drm_atomic_helper_set_config(9)drm_atomic_helper_disable_all(9)drm_atomic_helper_reset_crtc(9)drm_atomic_helper_shutdown(9)drm_atomic_helper_duplicate_state(9)drm_atomic_helper_suspend(9)drm_atomic_helper_commit_duplicated_state(9)drm_atomic_helper_resume(9)drm_atomic_helper_page_flip(9)drm_atomic_helper_page_flip_target(9)drm_atomic_helper_bridge_propagate_bus_fmt(9)drm_atomic_helper_bridge_get_hdmi_output_bus_fmts(9)
okay that's the page!! π this little bundle of joy ships out of ./drivers/gpu/drm, dated October 2026, and yes the page title is still drm_atomic_h...eanup_planes(9) because the man page gods truncated it and we respect their choices. mwah π stay clean, stay atomic, and don't forget to unprepare π§ββοΈβ¨
π¦ 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