devm_drm_of_get_bridge(9)
β¨ 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 frendpointβ 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 todevbecause of thedevm_prefix β that's the whole point, don't @ me π₯
π SEE ALSO π
Kernel file ./drivers/gpu/drm/bridge/panel.c β and her whole 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)drmm_of_get_bridge(9)
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
- 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