drm_atomic_a...d_connectors(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 0 on success πŸŽ‰
  • can fail with -EDEADLK or -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:

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