drm_atomic_g..._for_encoder(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ drm_atomic_get_old_connector_for_encoder(9) πŸ‘‘

okay so bestie, welcome to the Kernel API Manual πŸ’… this is the little page about drm_atomic_get_old_connector_for_encoder(9) and honestly it's a whole vibe β€” we're doing atomic modesetting archaeology and digging up the old connector. slay.


✨ NAME ✨

drm_atomic_get_old_connector_for_encoder β€” Get old connector for an encoder πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_connector * drm_atomic_get_old_connector_for_encoder (const
struct drm_atomic_commit *state , struct drm_encoder *encoder );

like, that's the whole signature. she's a struct drm_connector * return, and she takes two args. no cap.


🌸 ARGUMENTS 🌸

  • state β€” Atomic state. yes queen, the atomic state, that's the one.
  • encoder β€” The encoder to fetch the connector state for. we're getting her connector state.

πŸ’– DESCRIPTION πŸ’–

This function finds and returns the connector that was connected to encoder as specified by the state. like it's matching them up, the way that a group chat matches a screenshot to a conversation. literally.

If there is no connector in state which previously had encoder connected to it, this function will return NULL. bestie, before you panic β€” while this may seem like an invalid use case, it is sometimes useful to differentiate commits which had no prior connectors attached to encoder vs ones that did (and to inspect their state). it's giving "the absence is the information" πŸ”₯ This is especially true in enable hooks because the pipeline has changed.

If you don't have access to the atomic state, see drm_atomic_get_connector_for_encoder. she's the other one. iykyk.

🫢 tiny note to self: NULL here is not automatically a bug β€” sometimes "nobody was attached before" is exactly the tea you were looking for.

⭐ RETURN ⭐

The old connector connected to encoder, or NULL if the encoder is not connected. that's it, that's the whole return. πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_atomic.c β€” and then the whole squad, in order, no skipping:


and that's the page, babe 🧚 she lives in ./drivers/gpu/drm, dated October 2026 β€” that's the source path and the date, so now you know where she came from and when she said it. go read the whole atomic state lifetime saga, i'm obsessed πŸ’œβœ¨

πŸ“¦ where this page comes from