drmm_of_get_bridge(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drmm_of_get_bridge β€” a whole page from the Kernel API Manual, bestie

Okay so picture this: you're deep in the kernel, you've got a device tree node, and you need the next bridge in the chain. That's literally the whole vibe of drmm_of_get_bridge. The manual name is Kernel API Manual btw, in case you were wondering where we are. πŸŽ€


✨ NAME ✨

drmm_of_get_bridge β€” returns the next bridge in the chain. That's it, that's the whole job. πŸ‘‘


🌸 SYNOPSIS 🌸

struct drm_bridge * drmm_of_get_bridge (struct drm_device *drm , struct
device_node *np , u32 port , u32 endpoint );
Heads up: that's the exact signature, line break and all. Don't @ me, the manpage did it. πŸ™ˆ

πŸ¦‹ ARGUMENTS πŸ¦‹

Four args, all iconic in their own way:

  • drm β€” the device you're tying the bridge's lifetime to. Like, the bridge lives and dies with this thing. Main character energy. πŸ’«
  • np β€” the device tree node that has the encoder output ports in it. The location, the address, the spot. πŸ—ΊοΈ
  • port β€” which port in that device tree node. Pick a number, any number (well, the right one). πŸ”’
  • endpoint β€” which endpoint in that device tree node. Same deal, different level. 🎯

πŸ’– DESCRIPTION πŸ’–

So here's what actually happens, ngl it's kinda elegant:

Given a DT node's port number and endpoint number, it finds the connected node and returns the associated bridge if there is one. And if a panel is connected instead? It creates and returns a drm panel bridge instance for you. Not me doing the extra credit and also handling the panel case. 😭✨

It returns a drmm managed pointer to the bridge if it's all good and successful, or an error pointer otherwise. So like β€” vibe check your return value before you use it, fr fr. πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/bridge/panel.c and honestly the whole bridge panel friend group:

Go read them, iykyk. 🫢


That's the page, bestie!! 🌸 Signing off from ./drivers/gpu/drm/bridge, dated October 2026 β€” no cap, that's literally what the footer said. Slay, bye! πŸ’…πŸ’œπŸŽ€

πŸ“¦ where this page comes from