All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Maxime Ripard" <mripard@kernel.org>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Jessica Zhang" <jesszhan0024@gmail.com>,
	"Linus Walleij" <linusw@kernel.org>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	"Hui Pu" <Hui.Pu@gehealthcare.com>,
	"Ian Ray" <ian.ray@gehealthcare.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 03/11] drm: of: drm_of_find_panel_or_bridge: prioritize the bridge, not the panel
Date: Mon, 24 Aug 2026 16:15:18 +0200	[thread overview]
Message-ID: <DKX8JT5WE9O0.2J5YV3529H80A@bootlin.com> (raw)
In-Reply-To: <20260824-bouncy-papaya-cat-2c2073@houat>

Hi Maxime,

On Mon Aug 24, 2026 at 10:16 AM CEST, Maxime Ripard wrote:
> 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.

Note there are many more drivers than those converted by patches 6-11 of
this series (see cover letter). So it would be a lot more work.

But based on your reply I assume you approve the 5-point plan above. Please
let me know if my understanding is incorrect.

Also note my plan is to try converting all drivers, definitely removing all
calls to drm_panel_bridge_add() and variants but not necessarily
drm_of_find_panel_or_bridge(), which then might exist for a longer
time. I'll see how things go as I look at drivers one my one.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2026-08-24 14:15 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 14:05 [PATCH 00/11] drm/panel: add a panel_bridge to every panel Luca Ceresoli
2026-08-14 14:05 ` [PATCH 01/11] drm: of: drm_of_find_panel_or_bridge: simplify freeing the remote node pointer Luca Ceresoli
2026-08-17  8:21   ` Maxime Ripard
2026-08-14 14:05 ` [PATCH 02/11] drm: of: drm_of_find_panel_or_bridge: simplify error return paths Luca Ceresoli
2026-08-17  8:23   ` Maxime Ripard
2026-08-14 14:05 ` [PATCH 03/11] drm: of: drm_of_find_panel_or_bridge: prioritize the bridge, not the panel Luca Ceresoli
2026-08-14 14:20   ` sashiko-bot
2026-08-17  8:26   ` Maxime Ripard
2026-08-17 12:23     ` Luca Ceresoli
2026-08-24  8:16       ` Maxime Ripard
2026-08-24 14:15         ` Luca Ceresoli [this message]
2026-08-14 14:05 ` [PATCH 04/11] drm/panel: merge the drm_kms_helper module into the drm module Luca Ceresoli
2026-08-14 14:13   ` sashiko-bot
2026-08-17  8:31   ` Maxime Ripard
2026-08-17 12:27     ` Luca Ceresoli
2026-08-24  7:48       ` Maxime Ripard
2026-08-24 14:16         ` Luca Ceresoli
2026-08-27 14:17           ` Maxime Ripard
2026-08-14 14:05 ` [PATCH 05/11] drm/bridge: panel: add a panel_bridge to every panel Luca Ceresoli
2026-08-14 14:25   ` sashiko-bot
2026-08-17 14:07     ` Luca Ceresoli
2026-08-17  8:42   ` Maxime Ripard
2026-08-17 12:30     ` Luca Ceresoli
2026-08-14 14:05 ` [PATCH 06/11] drm/bridge: tc358767: don't create a panel_bridge Luca Ceresoli
2026-08-14 14:17   ` sashiko-bot
2026-08-14 14:05 ` [PATCH 07/11] drm/bridge: waveshare-dsi: " Luca Ceresoli
2026-08-14 14:05 ` [PATCH 08/11] drm/mcde: dsi: simplify device_node management using scoped for_each variant Luca Ceresoli
2026-08-14 14:19   ` sashiko-bot
2026-08-17  8:43   ` Maxime Ripard
2026-08-17 12:25   ` Linus Walleij
2026-08-17 12:34     ` Luca Ceresoli
2026-08-14 14:05 ` [PATCH 09/11] drm/mcde: dsi: don't create a panel_bridge Luca Ceresoli
2026-08-14 14:24   ` sashiko-bot
2026-08-17 12:23   ` Linus Walleij
2026-08-14 14:05 ` [PATCH 10/11] drm/bridge: fsl-ldb: " Luca Ceresoli
2026-08-14 14:18   ` sashiko-bot
2026-08-14 14:05 ` [PATCH 11/11] drm/bridge: samsung-dsim: " Luca Ceresoli
2026-08-14 14:23   ` sashiko-bot
2026-08-14 14:13 ` [PATCH 00/11] drm/panel: add a panel_bridge to every panel Luca Ceresoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DKX8JT5WE9O0.2J5YV3529H80A@bootlin.com \
    --to=luca.ceresoli@bootlin.com \
    --cc=Hui.Pu@gehealthcare.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ian.ray@gehealthcare.com \
    --cc=inki.dae@samsung.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jesszhan0024@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linusw@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.