drm_atomic_g..._for_encoder(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_g..._for_encoder(9) β€” Kernel API Manual, bestie edition πŸŽ€

okay so you found the drm_atomic_g..._for_encoder(9) page in the Kernel API Manual and you want the tea. respect. it's all here, nothing skipped, pinky promise 🫢


✨ NAME ✨

drm_atomic_get_connector_for_encoder β€” get the connector that's currently assigned to an encoder


🌸 SYNOPSIS 🌸

struct drm_connector * drm_atomic_get_connector_for_encoder (const
       struct drm_encoder *encoder , struct drm_modeset_acquire_ctx *ctx );

like, that's the whole vibe. one function, two args, returns a connector pointer πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • encoder β€” the encoder you're trying to find the connector of. that's the whole quest, bestie πŸ”
  • ctx β€” the modeset locking context. yes you need it. no you can't skip it πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so this function goes out and finds the connector that's currently assigned to an encoder, and returns it. that's it. that's the job. iconic behaviour honestly πŸ‘‘

it's similar to the drm_atomic_get_old_connector_for_encoder and drm_atomic_get_new_connector_for_encoder helpers β€” but the difference is it doesn't require access to the atomic state. and like, if you do have access to the atomic state? prefer using those two instead. fr fr, this one is the backup plan, not the main character πŸ’…

so when is this helper actually useful? it's typically for situations where you don't have access to the atomic state, like:

  • detect
  • link repair
  • threaded interrupt handlers
  • hooks from other frameworks (ALSA, CEC, etc.)

that's literally the list. those are the moments where this thing eats πŸ”₯


⭐ RETURN ⭐

you get the connector connected to encoder β€” or an error pointer otherwise. and bestie, listen: when the error is EDEADLK, that means a deadlock has been detected and the sequence must be restarted. do not ignore that. deadlock detected = go around again, no cap 😭


🌈 SEE ALSO 🌈

buckle up, this list is long and we're listing every single one because we don't gatekeep here πŸ’–


lowkey a vibe check for your atomic state: if you already have it, use the old/new helpers instead. this one's for the no-atomic-state girlies 🧚

and that's the page!! πŸ“ it lives in ./drivers/gpu/drm, dated October 2026, and it's filed under drm_atomic_g..._for_encoder(9) in the Kernel API Manual. mwah, go read your connectors πŸ’‹βœ¨

πŸ“¦ where this page comes from