drm_atomic_a...ted_colorops(9)
π drm_atomic_add_affected_colorops(9) β¨
okay so bestie, welcome to the Kernel API Manual β this one's called drm_atomic_add_affected_colorops and it's lowkey a little glamorous helper for planes and their colorops π
πΈ NAME πΈ
drm_atomic_add_affected_colorops β add colorops for plane π
β¨ SYNOPSIS β¨
int drm_atomic_add_affected_colorops (struct drm_atomic_commit *state ,
struct drm_plane *plane );
π¦ ARGUMENTS π¦
stateβ the atomic state, aka the whole vibe of the pending commit β¨planeβ a DRM plane, the main character of this function ngl π
π DESCRIPTION π
okay so what this does: it walks the current configuration and adds all the colorops currently used by plane straight into the atomic configuration state. it's giving "collect them all" energy π«Ά
why is that useful? because sometimes an atomic commit also needs to check all the currently enabled colorops on plane β like, say, when you're changing the mode. and it's also useful when you're re-enabling a plane, so you don't have to write special code just to force-enable all the colorops π
and here's the iconic part: since acquiring a colorop state will always also acquire the w/w mutex of the current plane for that colorop (if there is any), adding all the colorop states for a plane will not reduce parallelism of atomic updates. no cap, it's free real estate π
π RETURN π
0on success π- can fail with
-EDEADLKor-ENOMEMπ - when the error is
EDEADLK, the w/w mutex code has detected a deadlock and the entire atomic sequence must be restarted π (dramatic but true) - all other errors are fatal π
bestie pls don't ignore an EDEADLK β restart the whole atomic sequence, that's the assignment π«‘
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_atomic.c β state lifetime(9), drm_crtc_commit_wait(9), drm_atomic_commit_default_release(9), drm_atomic_commit_init(9), drm_atomic_commit_alloc(9), drm_atomic_commit_default_clear(9), drm_atomic_commit_clear(9), __drm_atomic_commit_free(9), drm_atomic_get_crtc_state(9), drm_atomic_get_plane_state(9), drm_atomic_get_colorop_state(9), drm_atomic_get_old_colorop_state(9), drm_atomic_get_new_colorop_state(9), drm_atomic_plane_check(9), handling driver private state(9), drm_atomic_private_obj_init(9), drm_atomic_private_obj_fini(9), drm_atomic_get_private_obj_state(9), drm_atomic_get_old_private_obj_state(9), drm_atomic_get_new_private_obj_state(9), drm_atomic_get_old_connector_for_encoder(9), drm_atomic_get_new_connector_for_encoder(9), drm_atomic_get_connector_for_encoder(9), drm_atomic_get_old_crtc_for_encoder(9), drm_atomic_get_new_crtc_for_encoder(9), drm_atomic_get_connector_state(9), drm_atomic_get_bridge_state(9), drm_atomic_get_old_bridge_state(9), drm_atomic_get_new_bridge_state(9), drm_atomic_add_encoder_bridges(9), drm_atomic_add_affected_connectors(9), drm_atomic_add_affected_planes(9), drm_atomic_check_only(9), drm_atomic_commit(9), drm_atomic_nonblocking_commit(9), drm_atomic_print_new_state(9), drm_state_dump(9)
that's the whole page bestie, go forth and add those colorops π§π
source: ./drivers/gpu/drm Β· October 2026 Β· drm_atomic_add_affected_colorops(9) β mwah, see u in the kernel docs again soon ππ
π¦ 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