drm_atomic_helper_check(9)
π drm_atomic_helper_check(9) π
okay so this is a page from the Kernel API Manual, and honestly? it's a bop. it's drm_atomic_helper_check, and it's here to tell you whether the state you're asking for is even physically possible or if you're delulu. vibe check for your atomic commit, basically. π¦
β¨ NAME β¨
drm_atomic_helper_check β bestie, it validates the state object. that's the whole job. π
πΈ SYNOPSIS πΈ
int drm_atomic_helper_check (struct drm_device *dev , struct
drm_atomic_commit *state );
π ARGUMENTS π
devβ the DRM device. the main character of this whole situation. πstateβ the driver state object. the thing we're checking. the moment of truth. β¨
π« DESCRIPTION π«
so what does it actually do? it checks the state object to see if the requested state is physically possible. fr fr. only CRTCs and planes have check callbacks, so if a driver needs any extra (global) checking, it can just wrap that around this function. and drivers with no such needs? they can directly use this as their drm_mode_config_funcs.atomic_check callback. slay, no extra work. π
this just wraps the two parts of the state checking for planes and modeset state, in the default order: first it calls drm_atomic_helper_check_modeset and then drm_atomic_helper_check_planes. the assumption here (iykyk) is that the drm_plane_helper_funcs.atomic_check and drm_crtc_helper_funcs.atomic_check functions depend upon an updated adjusted_mode.clock to e.g. properly compute watermarks. the way that clock needs to be updated before anyone does math on it π
and now, the plot twist: note that zpos normalization will add all enable planes to the state, which might not be desired for some drivers. for example, enable/disable of a cursor plane which have fixed zpos value would trigger all other enabled planes to be forced to the state change. lowkey chaotic but that's the tea. π΅
IMPORTANT: since this function callsdrm_atomic_helper_check_modesetinternally, its restrictions also apply too, no cap. drivers which setdrm_crtc_state.mode_changed(like, e.g. in theirdrm_plane_helper_funcs.atomic_checkhooks if a plane update can't be done without a full modeset) _must_ calldrm_atomic_helper_check_modesetfunction again after that change. like. you have to. it's not optional. π¨
π₯ RETURN π₯
zero for success, or -errno. that's it, that's the whole vibe check result. π
π SEE ALSO π
okay bestie, this list is long, but every single one of these is iconic in its own right, so we're listing them all. no skipping. periodt. π
- 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_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_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)
π«Ά the cute sign-off π«Ά
this one lives in ./drivers/gpu/drm, dated October 2026, and it's filed under drm_atomic_helper_check(9) in case you need to find it again later. go forth and validate your state objects, bestie. you're gonna slay. πβ¨π
π¦ 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