drm_atomic_a...d_connectors(9)
π drm_atomic_add_affected_connectors(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this is the page for drm_atomic_add_affected_connectors, and honestly? it's giving "small function, big responsibility" energy. let's get into it π«Ά
πΈ NAME πΈ
drm_atomic_add_affected_connectors β adds connectors for a CRTC, periodt π
π¦ SYNOPSIS π¦
int drm_atomic_add_affected_connectors (struct drm_atomic_commit *state
, struct drm_crtc *crtc );
like, that's the whole signature. two arguments. no cap. β¨
π ARGUMENTS π
stateβ the atomic state, aka the main character of this whole operation πcrtcβ a DRM CRTC. yes babes, that kind of CRTC π₯οΈ
π DESCRIPTION π
so here's the vibe: this function walks the current configuration (yes, literally strolls through it, main character energy) and adds all connectors currently using crtc to the atomic configuration state. obsessed. π
β οΈ but listen β this function must acquire the connection mutex. that's not optional, that's the law.
and lowkey that can potentially cause unneeded serialization if the update is just for the planes on one CRTC π so if you're only touching planes on a single CRTC, you might be doing extra work for no reason.
hence β and this is the important part, iykyk β drivers and helpers should only call this when really needed, e.g. when a full modeset needs to happen due to some change. don't just call it for funsies, bestie. π
β RETURN β
- returns
0on success π - can fail with
-EDEADLKor-ENOMEMπ
and now the serious bit, fr fr:
when the error is EDEADLK, that means the w/w mutex code has detected a deadlock and the entire atomic sequence must be restarted. all other errors are fatal. no pressure or anything π
π§ SEE ALSO π§
Kernel file ./drivers/gpu/drm/drm_atomic.c π¦ and all these iconic siblings:
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_planes(9)drm_atomic_add_affected_colorops(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)
like, that's a whole friend group right there π
β¨ and that's the page!! β¨
this lil gem lives over in ./drivers/gpu/drm, it's dated October 2026, and it's out here doing the Kernel API Manual thing π go forth and only call it when you really need it, bestie ππ¦π
π¦ 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