drm_atomic_...licate_state(9)
π
drm_atomic_helper_duplicate_state β a whole <italic>Kernel API Manual</italic> moment β¨
okay bestie, so this one is drm_atomic_helper_duplicate_state(9) and it's literally the "save a copy before you do something drastic" girlie of the DRM atomic world π
β¨ SYNOPSIS β¨
struct drm_atomic_commit * drm_atomic_helper_duplicate_state (struct
drm_device *dev , struct drm_modeset_acquire_ctx *ctx );
πΈ ARGUMENTS πΈ
devβ the DRM device, obvi πctxβ the lock acquisition context. that's the vibe check for your locks π
π¦ DESCRIPTION π¦
okay so what this does π β it makes a copy of the current atomic state by looping over literally all the objects and duplicating their respective states. no cap, every single one. this is used, for example, by the suspend/resume support code to save the state prior to suspend so that it can be restored upon resume. iconic behavior honestly π«Ά
β οΈ note: this treats atomic state as persistent between save and restore. drivers must make sure that this is actually possible and won't result in confusion or erroneous behaviour. like, don't just assume, bestie β check π
β οΈ also note: if callers haven't already acquired all modeset locks, this might return-EDEADLK, which must be handled by callingdrm_modeset_backoff. so don't ignore that return value, or it's giving deadlock π
see also: drm_atomic_helper_suspend, drm_atomic_helper_resume β¨
π RETURN π
A pointer to the copy of the atomic state object on success, or an ERR_PTR-encoded error code on failure. so like, always check it, fr fr π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_atomic_helper.coverview(9)drm_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_cleanup_planes(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_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)
like, that's the whole friend group right there ππ
okay that's the whole page bestie, you ate that π«Ά this little β¨ bop β¨ comes to you from ./drivers/gpu/drm, dated October 2026 β and it's filed right back under drm_atomic_...licate_state(9), periodt π
π
π¦ 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