Re: [PATCH 03/11] drm: of: drm_of_find_panel_or_bridge: prioritize the bridge, not the panel

Maxime Ripard <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <20260824-bouncy-papaya-cat-2c2073@houat>
On Mon, Aug 17, 2026 at 02:23:05PM +0200, Luca Ceresoli wrote:
> > That being said, if we do create a panel_bridge for every panel, why do
> > we still need drm_of_find_panel_or_bridge()? We'll only really need
> > of_drm_find_bridge(), no?
> 
> Yes, in the long term we can get rid of drm_of_find_panel_or_bridge(), but
> not in the short term due to the above mentioned drivers, and others which
> use it in "creative" ways.
> 
> The point is about the transition. This patch was an attempt to convert at
> once all the many drivers which use the most common pattern:
> 
>       | drm_of_find_panel_or_bridge(..., &panel, &bridge);
>       | if (panel)
>       |     bridge = drm_panel_bridge_add();
> 
> to then fix manually the remaining drivers (patches 6-11).
> 
> But this approach doesn't fly due to the legacy users of
> drm_of_find_panel_or_bridge() as mentioned above.
> 
> So what about this other approach instead:
> 
>  1. leave drm_of_find_panel_or_bridge() as is (it's already deprecated anyway)
>  2. keep patch 5 (which "breaks" mayt drivers which would create an additional
>     panel_bridge)
>  3. perhaps add a warning when an additional bridge is created for the
>     some panel
>  4. *in the same series*, manually convert *all* drivers to use
>     of_drm_find_bridge() or of_drm_get_bridge_by_endpoint() -- like patches
>     6-11, but done on all drivers
>  5. apply the series atomically, because it wouldn't be bisectable between
>     items 2 and 4
> 
> Your opinion?

If we look at the drivers causing us troubles, fsl-ldb, samsung-dsim,
tc358767 and waveshare-dsi can be converted directly to
devm_drm_of_get_bridge().

mcde-dsi is a mess and would be hard to fix indeed, but since it's the
only really troublesome one, maybe we can just duplicate the code in the
driver and drop / rewrite the common code however we see fit.

Maxime
signature.asc (application/pgp-signature, 273 B)
-----BEGIN PGP SIGNATURE-----

iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCaov99AAKCRAnX84Zoj2+
dm5RAYDFgncWfB8HNVBV3A4Zy3M1e1HjfjQlHBNI/8wz2WrjIFMjDK3NHra4s3x1
HWUTpmMBgIl7aZq/J/YJAo6vpIB/4wV7ZaQtf1Qmu3VMOYg+lkL7S3tA5Due5REl
ljvLSizFiA==
=7yEV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.