drmm_of_get_bridge(9)
π 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:
drm_bridge_is_panel(9)drm_panel_bridge_add(9)drm_panel_bridge_add_typed(9)drm_panel_bridge_remove(9)drm_panel_bridge_set_orientation(9)devm_drm_panel_bridge_add(9)devm_drm_panel_bridge_add_typed(9)drmm_panel_bridge_add(9)drm_panel_bridge_connector(9)devm_drm_of_get_bridge(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms