devm_drm_of_get_bridge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ devm_drm_of_get_bridge(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– β€” this one's a little function with main character energy: devm_drm_of_get_bridge, and it's literally here to hand you the next bridge in the chain πŸŽ€

🌸 NAME 🌸

devm_drm_of_get_bridge β€” return next bridge in the chain πŸ¦‹

✨ SYNOPSIS ✨

struct drm_bridge * devm_drm_of_get_bridge (struct device *dev , struct
       device_node *np , u32 port , u32 endpoint );

no cap, that's the whole signature β€” copy it exactly, she's particular about her types πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're tying the bridge's lifetime to 🫢 (yes, devm = managed, she cleans up after herself, iconic)
  • np β€” the device tree node that's holding the encoder output ports 🌈
  • port β€” which port in that device tree node, fr fr
  • endpoint β€” which endpoint in that device tree node, iykyk ⭐

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe check: given a DT node's port and endpoint number, she finds the connected node and returns the associated bridge if there is one 😌 β€” or, plot twist, she creates and returns a drm panel bridge instance if a panel is connected instead πŸ“ literally so flexible of her.

Returns a pointer to the bridge if successful, or an error pointer otherwise πŸ’€ (so like, always check, bestie, please πŸ™ˆ).

ok but the way that lifetime is tied to dev because of the devm_ prefix β€” that's the whole point, don't @ me πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/gpu/drm/bridge/panel.c β€” and her whole friend group:

go read them, they ate πŸ’…βœ¨


and that's the page 🧚 shoutout to the source ./drivers/gpu/drm/bridge, Kernel API Manual edition, dated October 2026 β€” periodt, you're welcome, mwah πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from