SPECIAL CARE DSI(9)
π special care dsi π
okay bestie so this is from the Kernel API Manual and it's literally about keeping your DRM bridges and MIPI-DSI hosts from having a whole messy situationship during probe. it's giving "will they won't they" but in kernel space, and honestly we need to talk about it π
β¨ DESCRIPTION β¨
the drama between the bridges and the other frameworks involved in probing the upstream driver and the bridge driver? highkey challenging. fr fr, there are multiple cases you gotta consider:
- the upstream driver doesn't use the component framework and isn't a MIPI-DSI host. in this case, the bridge driver will probe at some point, and the upstream driver should try to probe again by returning
EPROBE_DEFERas long as the bridge driver hasn't probed. like, just keep trying babe π«Ά - the upstream driver doesn't use the component framework, but is a MIPI-DSI host. here the bridge device uses the MIPI-DCS commands to be controlled. in this case, the bridge device is a child of the display device, and when it probes it's assured that the display device (and MIPI-DSI host) is present. the upstream driver will be assured that the bridge driver is connected between the
mipi_dsi_host_ops.attachandmipi_dsi_host_ops.detachoperations. therefore it must runmipi_dsi_host_registerin its probe function, and then rundrm_bridge_attachin itsmipi_dsi_host_ops.attachhook. no skipping steps, that's the rule β¨ - the upstream driver uses the component framework and is a MIPI-DSI host. bridge device still uses the MIPI-DCS commands to be controlled. this is the same situation as above, and it can run
mipi_dsi_host_registerin either its probe or bind hooks. flexible queen π - the upstream driver uses the component framework and is a MIPI-DSI host, but the bridge device uses a separate bus (such as I2C) to be controlled. okay so in this case there's like, no correlation between the probe of the bridge and the upstream drivers π so care must be taken to avoid an endless
EPROBE_DEFERloop, with each driver waiting for the other to probe. it's giving two people texting "you go first" forever. don't do that.
β οΈ that last one is the actual trap bestie β endless EPROBE_DEFER loops are real and they will absolutely eat your boot time alive. be careful!
πΈ the ideal pattern πΈ
the ideal pattern to cover the last item (and all the others in the MIPI-DSI host driver case) is to split the operations like this:
- the MIPI-DSI host driver must run
mipi_dsi_host_registerin its probe hook. this makes sure the MIPI-DSI host sticks around, and that the driver's bind can be called. iconic, no notes π - in its probe hook, the bridge driver must try to find its MIPI-DSI host, register as a MIPI-DSI device, and attach the MIPI-DSI device to its host. the bridge driver is now functional. slay π
- in its
struct mipi_dsi_host_ops.attachhook, the MIPI-DSI host can now add its component. its bind hook will now be called, and since the bridge driver is attached and registered, we can now look for it and attach it. the way that this just works π¦
at this point, we're now certain that both the upstream driver and the bridge driver are functional, and we can't have a deadlock-like situation when probing. periodt. no cap. that's the whole vibe check and it passed π
β SEE ALSO β
- Kernel file
./drivers/gpu/drm/drm_bridge.c overview(9)display driver integration(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)drm_bridge_attach(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)
that's the whole page bestie, go probe something safely π
mwah π β from ./drivers/gpu/drm, October 2026, and yes it's still special care dsi(9) π
π¦ 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