drm_panel_bridge_add(9)
π drm_panel_bridge_add(9) β like, the Kernel API Manual, bestie π
okay so real talk, this one lives in the Kernel API Manual and it's honestly kind of iconic once you get what it's doing. Let's get into it β¨
πΈ NAME πΈ
drm_panel_bridge_add β creates a &drm_bridge and a &drm_connector that literally just call the appropriate functions from &drm_panel. That's the whole vibe, no cap π«Ά
β¨ SYNOPSIS β¨
struct drm_bridge * drm_panel_bridge_add (struct drm_panel *panel );
π¦ ARGUMENTS π¦
panelβ thedrm_panelthat's getting wrapped up all cozy. must be non-NULL fr fr, don't come at it with a NULL, it will not slay π
π DESCRIPTION π
so this is for the drivers out there converting from directly using drm_panel (glow-up era β¨). the expected usage pattern? okay so:
- during either encoder module probe or DSI host attach, a
drm_panelgets looked up throughdrm_of_find_panel_or_bridge - then
drm_panel_bridge_addwraps that panel in the new bridge, and the result can be passed right along todrm_bridge_attach - and here's the fun part β
drm_panel_prepareand its related functions can be dropped from the encoder driver entirely (they're now called by the KMS helpers before calling into the encoder), along with connector creation. like, bye bestie, the helpers handle it π - when you're done with the bridge (after
drm_mode_config_cleanupif the bridge has already been attached), then you hit updrm_panel_bridge_removeto free it. clean up your room, periodt π§Ή
the connector type gets set to panel->connector_type, and it must be set to a known type. so like, calling this function with a panel whose connector type is DRM_MODE_CONNECTOR_Unknown will return ERR_PTR(-EINVAL). vibe check failed, respectfully π
also! peep devm_drm_panel_bridge_add if you want an automatically managed version of this function. it's giving "I'll handle the cleanup for you, you're welcome" π
π₯ SEE ALSO π₯
kernel file ./drivers/gpu/drm/bridge/panel.c plus the whole friend group:
drm_bridge_is_panel(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)drmm_of_get_bridge(9)
and that's the whole page, bestie β mwah π this little beauty comes from ./drivers/gpu/drm/bridge, dated October 2026, and it's filed under drm_panel_bridge_add(9). go forth and wrap those panels, you've absolutely got this ππ
π¦ 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