[PATCH 19/37] drm/bridge: samsung-dsim: move drm_bridge_add() call to probe
Maxime Ripard
mripard at kernel.org
Mon Jun 8 04:58:27 PDT 2026
On Tue, May 19, 2026 at 12:37:36PM +0200, Luca Ceresoli wrote:
> This bridge driver calls drm_bridge_add() in the DSI host .attach callback
> instead of in the probe function.
>
> This works for current use cases but is problematic for supporting hotplug
> of DRM bridges. The problematic case is when this DSI host is always
> present while its DSI device is hot-pluggable. In such case with the
> current code the DRM card will not be populated until after the DSI device
> attaches to the host, which could happen a very long time after booting, or
> even not happen at all.
>
> The reason is that the previous pipeline component (the encoder in this
> case) when probing cannot find the samsung-dsim bridge. What happens is:
>
> [1 and 2 can happen in any order, same result]
> 1) samsung-dsim probes (does not drm_bridge_add() itself)
> 2) The lcdif starts probing multiple times, but
> lcdif_probe
> -> lcdif_load
> -> lcdif_attach_bridge
> -> devm_drm_of_get_bridge() returns -EPROBE_DEFER because
> the samsung-dsim is not in the global bridge_list
> (deferred probe pending: imx-lcdif: Cannot connect bridge)
>
> The samsung-dsim will not drm_bridge_add() itself until a DSI device will
> try to mipi_dsi_attach() to the DSI Host, which can happen arbitratily late
> on hot-pluggable hardware.
>
> As a preliminary step to supporting hotplug move drm_bridge_add() at probe
> time, so that the samsung-dsim DSI host bridge is available during boot,
> even without a connected DSI device. This results in:
>
> 1) samsung-dsim probes (and adds to drm_bridge_add() itself)
> 2) The lcdif starts probing multiple times, but
> lcdif_probe
> -> lcdif_load
> -> lcdif_attach_bridge
> -> devm_drm_of_get_bridge() --> OK, returns samsung-dsim ptr
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
We should probably amend
https://www.kernel.org/doc/html/latest/gpu/drm-kms-helpers.html#special-care-with-mipi-dsi-bridges
To mention this use case here
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260608/4c4f1cbf/attachment.sig>
More information about the linux-arm-kernel
mailing list