drm_bridge_attach(9)
π drm_bridge_attach(9) β Kernel API Manual, bestie edition
okay so we're in the Kernel API Manual today and the vibe is bridge engineering π like the drm_bridge_attach(9) girlies know exactly what's up. let's get into it β¨
πΈ NAME πΈ
drm_bridge_attach β attach the bridge to an encoder's chain π«
β¨ SYNOPSIS β¨
int drm_bridge_attach (struct drm_encoder *encoder , struct drm_bridge
*bridge , struct drm_bridge *previous , enum drm_bridge_attach_flags
flags );
π«Ά ARGUMENTS π«Ά
- encoder β the DRM encoder. the main character of this whole situation ngl π
- bridge β the bridge you're attaching. she's the one we're linking up π
- previous β the previous bridge in the chain (optional, bestie, it's fine if she's not there) π¦
- flags β the
DRM_BRIDGE_ATTACH_*flags. literally the flags, that's the whole description π
π§ DESCRIPTION π§
So a kms driver calls this to link the bridge to an encoder's chain. β¨ The previous argument specifies the previous bridge in the chain β very much giving "who came before me" energy. If it's NULL, the bridge is linked directly at the encoder's output. Otherwise it gets linked at the previous bridge's output. periodt π
If previous is non-NULL, that previous bridge must already be attached by a call to this function. no cap, that's a requirement fr fr π
The bridge you're attaching must have been previously added by drm_bridge_add. like she has to exist before you can be obsessed with her, y'know? π
β οΈ important vibes: bridges attached to encoders are auto-detached during encoder cleanup indrm_encoder_cleanup, sodrm_bridge_attachshould generally not be balanced with adrm_bridge_detachin driver code. not me warning you about double-detaching π please don't.
β RETURN β
Zero on success, error code on failure. that's it, that's the tea π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/drm_bridge.c, plus the whole friend group:
overview(9)display driver integration(9)special care dsi(9)dsi bridge operations(9)bridge chain format selection(9)drm_bridge_enter(9)drm_bridge_exit(9)drm_bridge_unplug(9)drm_bridge_get(9)drm_bridge_put(9)drm_bridge_clear_and_put(9)drm_bridge_put_void(9)drm_bridge_add(9)devm_drm_bridge_add(9)drm_bridge_remove(9)bridge operations(9)drm_bridge_chain_mode_valid(9)drm_bridge_chain_mode_set(9)drm_atomic_bridge_chain_disable(9)drm_atomic_bridge_chain_post_disable(9)drm_atomic_bridge_chain_pre_enable(9)drm_atomic_bridge_chain_enable(9)drm_atomic_bridge_chain_check(9)drm_bridge_detect(9)drm_bridge_get_modes(9)drm_bridge_edid_read(9)drm_bridge_hpd_enable(9)drm_bridge_hpd_disable(9)drm_bridge_hpd_notify(9)of_drm_find_and_get_bridge(9)of_drm_find_bridge(9)of_drm_get_bridge_by_endpoint(9)devm_drm_put_bridge(9)
k bye bestie, go attach some bridges π this page lives in ./drivers/gpu/drm, dated October 2026, and it's literally drm_bridge_attach(9) β iykyk π¦π
π¦ 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