drm_bridge_get_next_bridge(9)
π drm_bridge_get_next_bridge(9) β Kernel API Manual, bestie edition β¨
okay so this is <pink>drm_bridge_get_next_bridge</pink> from the Kernel API Manual, and it's literally the glow-up you need when you're stuck in a bridge chain and gotta find out who's next. no cap, it's giving "linked list but make it β¨graphicsβ¨". let's get into it π
πΈ NAME πΈ
drm_bridge_get_next_bridge β get the next bridge in the chain π¦
like, the next one. the one after this one. you get it. π
β¨ SYNOPSIS β¨
struct drm_bridge * drm_bridge_get_next_bridge (struct drm_bridge
*bridge );
yep that's the whole thing, she's compact and iconic π
π ARGUMENTS π
bridgeβ bridge object π«Ά (that's your starting point, bestie β the bridge whose neighbor you're tryna find)
π DESCRIPTION π
okay so first things first, and this part is on you, not on the function: the caller is responsible of having a reference to bridge via drm_bridge_get or equivalent. like, you gotta come correct. have your ref, don't be out here raw-dogging pointers π
now the cute part: this function leaves the refcount of bridge unmodified. she does not touch it. she does not bump it. she does not drop it. she's a respectful queen π and she minds her business.
BUT β and this is the plot twist β the refcount of the returned bridge is incremented π₯. so the bridge she hands you back? that one's now your problem. you own a ref. slay, but like, responsibly.
so use drm_bridge_put when you're done with it. periodt. don't leave it hanging, that's a leak and leaks are not the vibe π
β RETURN β
the next bridge in the chain after bridge π β or NULL if bridge is the last one. that's it, that's the end of the line, no more bridges, go home π§
π¦ SEE ALSO π¦
bestie you are not gonna believe how much lore there is. the kernel file is ./include/drm/drm_bridge.h and here's the whole friend group π
enum drm_bridge_attach_flags(9)struct drm_bridge_funcs(9)struct drm_bridge_timings(9)enum drm_bridge_ops(9)struct drm_bridge(9)devm_drm_bridge_alloc(9)drm_bridge_get_current_state(9)drm_bridge_get_prev_bridge(9)β yes there's a prev one, she's the main character's sister πdrm_bridge_chain_get_first_bridge(9)drm_bridge_chain_get_last_bridge(9)drm_for_each_bridge_in_chain(9)drm_for_each_bridge_in_chain_from(9)
lowkey an entire friend group, iykyk πΈ
ngl there's nothing dangerous here β just don't forget the drm_bridge_put or the refcount will haunt you forever π
and that's the page, bestie!! π«Ά this one lives under ./include/drm in the Kernel API Manual, dated October 2026, and the header/footer both just say drm_bridge_get_next_bridge(9) again because the kernel likes repeating itself π mwah, go touch some struct drm_bridge πβ¨
π¦ 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