All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Cc: "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>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Alexey Brodkin" <abrodkin@synopsys.com>,
	"Phong LE" <ple@baylibre.com>, "Liu Ying" <victor.liu@nxp.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Adrien Grassein" <adrien.grassein@gmail.com>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Anitha Chrisanthus" <anitha.chrisanthus@intel.com>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Hui Pu" <Hui.Pu@gehealthcare.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Louis Chauvet" <louis.chauvet@bootlin.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <imx@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-renesas-soc@vger.kernel.org>,
	<linux-amlogic@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v2 17/26] drm/meson: encoder_*: use devm_of_drm_get_bridge() to put the next bridge
Date: Wed, 17 Dec 2025 09:15:48 +0100	[thread overview]
Message-ID: <DF0CCD6EW5DR.3CYNK65T1GSAO@bootlin.com> (raw)
In-Reply-To: <CAFBinCBaXRNBHpY2uYy4FxyAOnRA4NxJtHbraG0=j_U6Dzz2=A@mail.gmail.com>

Hello Martin,

On Wed Dec 17, 2025 at 1:01 AM CET, Martin Blumenstingl wrote:
> Hi Luca,
>
> On Tue, Dec 16, 2025 at 1:46 PM Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:
> [...]
>> > What I'm not sure about is how this series interacts with
>> > devm_drm_of_get_bridge() which is why I'm asking before cooking a
>> > patch.
>>
>> Apologies for the long delay in getting back to you. You might have noticed
>> some discussion about the overall approach, and I waited for it to settle.
> That hasn't gone unnoticed!
>
>> About devm_drm_of_get_bridge(), it is a very different function so it does
>> not affect this series. The name similarity is confusing indeed, but
>> devm_of_drm_get_bridge() has been removed from my approach, so one less
>> source of confusion.
> I have to confess that I'm still confused. drivers/gpu/drm/drm_bridge.c states:
> "Display drivers are responsible for linking encoders with the first bridge
>  in the chains. This is done by acquiring the appropriate bridge with
>  devm_drm_of_get_bridge(). Once acquired, the bridge shall be attached to the
>  encoder with a call to drm_bridge_attach().
>
>  Bridges are responsible for linking themselves with the next bridge in the
>  chain, if any. This is done the same way as for encoders, with the call to
>  drm_bridge_attach() occurring in the &drm_bridge_funcs.attach operation."
> Does this mean your series effectively deprecates devm_drm_of_get_bridge()?

Well spotted! I theory yes, my series kind of implicitly deprecates other
functions based on it, including drm_of_find_panel_or_bridge() and
*_of_get_bridge(), which are problematic in case of bridge removal. But
before explicitly deprecating them we need a good alternative. Which in
turn depends on the rework of the panel_bridge lifetime, which was also
discussed with Maxime in the same thread.

Bottom line: for now *_of_get_bridge() usage is still OK, but stay
tuned. :-)

>> I'm soon sending v3, and I have updated my patch to
>> eson_encoder_{cvbs,dsi,hdmi}.c, actually splitting it in 3. I'd be grateful
>> if you could reviewd and/ot test them when I send v3. But I don't think
>> there is a need for you to send any patches related to this topic.
> Regardless of the questions I still have around
> devm_drm_of_get_bridge(): I'll give your patches a go in the next
> days.

Thank you, v3 is there awaiting you!

Best regards,
Luca

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

WARNING: multiple messages have this Message-ID (diff)
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>
Cc: "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>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Alexey Brodkin" <abrodkin@synopsys.com>,
	"Phong LE" <ple@baylibre.com>, "Liu Ying" <victor.liu@nxp.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Adrien Grassein" <adrien.grassein@gmail.com>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Tomi Valkeinen" <tomi.valkeinen+renesas@ideasonboard.com>,
	"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Anitha Chrisanthus" <anitha.chrisanthus@intel.com>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Hui Pu" <Hui.Pu@gehealthcare.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Louis Chauvet" <louis.chauvet@bootlin.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<linux-doc@vger.kernel.org>, <imx@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-renesas-soc@vger.kernel.org>,
	<linux-amlogic@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH v2 17/26] drm/meson: encoder_*: use devm_of_drm_get_bridge() to put the next bridge
Date: Wed, 17 Dec 2025 09:15:48 +0100	[thread overview]
Message-ID: <DF0CCD6EW5DR.3CYNK65T1GSAO@bootlin.com> (raw)
In-Reply-To: <CAFBinCBaXRNBHpY2uYy4FxyAOnRA4NxJtHbraG0=j_U6Dzz2=A@mail.gmail.com>

Hello Martin,

On Wed Dec 17, 2025 at 1:01 AM CET, Martin Blumenstingl wrote:
> Hi Luca,
>
> On Tue, Dec 16, 2025 at 1:46 PM Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:
> [...]
>> > What I'm not sure about is how this series interacts with
>> > devm_drm_of_get_bridge() which is why I'm asking before cooking a
>> > patch.
>>
>> Apologies for the long delay in getting back to you. You might have noticed
>> some discussion about the overall approach, and I waited for it to settle.
> That hasn't gone unnoticed!
>
>> About devm_drm_of_get_bridge(), it is a very different function so it does
>> not affect this series. The name similarity is confusing indeed, but
>> devm_of_drm_get_bridge() has been removed from my approach, so one less
>> source of confusion.
> I have to confess that I'm still confused. drivers/gpu/drm/drm_bridge.c states:
> "Display drivers are responsible for linking encoders with the first bridge
>  in the chains. This is done by acquiring the appropriate bridge with
>  devm_drm_of_get_bridge(). Once acquired, the bridge shall be attached to the
>  encoder with a call to drm_bridge_attach().
>
>  Bridges are responsible for linking themselves with the next bridge in the
>  chain, if any. This is done the same way as for encoders, with the call to
>  drm_bridge_attach() occurring in the &drm_bridge_funcs.attach operation."
> Does this mean your series effectively deprecates devm_drm_of_get_bridge()?

Well spotted! I theory yes, my series kind of implicitly deprecates other
functions based on it, including drm_of_find_panel_or_bridge() and
*_of_get_bridge(), which are problematic in case of bridge removal. But
before explicitly deprecating them we need a good alternative. Which in
turn depends on the rework of the panel_bridge lifetime, which was also
discussed with Maxime in the same thread.

Bottom line: for now *_of_get_bridge() usage is still OK, but stay
tuned. :-)

>> I'm soon sending v3, and I have updated my patch to
>> eson_encoder_{cvbs,dsi,hdmi}.c, actually splitting it in 3. I'd be grateful
>> if you could reviewd and/ot test them when I send v3. But I don't think
>> there is a need for you to send any patches related to this topic.
> Regardless of the questions I still have around
> devm_drm_of_get_bridge(): I'll give your patches a go in the next
> days.

Thank you, v3 is there awaiting you!

Best regards,
Luca

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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2025-12-17  8:16 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 16:50 [PATCH v2 00/26] drm/bridge: add drm_of_find_bridge(), deprecate of_drm_find_bridge() Luca Ceresoli
2025-11-28 16:50 ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 01/26] drm/bridge: add of_drm_get_bridge() Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-12-15 14:29   ` Maxime Ripard
2025-12-15 14:29     ` Maxime Ripard
2025-11-28 16:50 ` [PATCH v2 02/26] drm/bridge: deprecate of_drm_find_bridge() Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-12-15 14:29   ` Maxime Ripard
2025-12-15 14:29     ` Maxime Ripard
2025-11-28 16:50 ` [PATCH v2 03/26] drm/todo: add entry about converting to of_drm_get_bridge() Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-12-15 15:15   ` Maxime Ripard
2025-12-15 15:15     ` Maxime Ripard
2025-11-28 16:50 ` [PATCH v2 04/26] drm/bridge: make of_drm_find_bridge() a wrapper of of_drm_get_bridge() Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 21:50   ` Randy Dunlap
2025-11-28 21:50     ` Randy Dunlap
2025-11-28 16:50 ` [PATCH v2 05/26] drm/arcpgu: convert to of_drm_get_bridge() Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 06/26] drm/bridge: add devm_of_drm_get_bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-12-15 15:21   ` Maxime Ripard
2025-12-15 15:21     ` Maxime Ripard
2025-11-28 16:50 ` [PATCH v2 07/26] drm/bridge: ite-it66121: use devm_of_drm_get_bridge() to put the next bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 08/26] drm/bridge: imx8qxp-pixel-combiner: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 09/26] drm/bridge: simple-bridge: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 10/26] drm/bridge: tpd12s015: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 11/26] drm/bridge: thc63lvd1024: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 12/26] drm/bridge: imx8qxp-pxl2dpi: use devm_of_drm_get_bridge() to put the next and companion bridges Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 13/26] drm/bridge: lt8912b: use devm_of_drm_get_bridge() to put the hdmi bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 14/26] drm/bridge: tfp410: use devm_of_drm_get_bridge() to put the next bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 15/26] drm/bridge: imx8qxp-ldb: use devm_of_drm_get_bridge() to put the companion bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 16/26] drm/rcar-du: lvds: use devm_of_drm_get_bridge() to put the next bridge Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 17/26] drm/meson: encoder_*: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-30 13:09   ` Martin Blumenstingl
2025-11-30 13:09     ` Martin Blumenstingl
2025-12-16 12:46     ` Luca Ceresoli
2025-12-16 12:46       ` Luca Ceresoli
2025-12-17  0:01       ` Martin Blumenstingl
2025-12-17  0:01         ` Martin Blumenstingl
2025-12-17  8:15         ` Luca Ceresoli [this message]
2025-12-17  8:15           ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 18/26] drm/bridge: sii902x: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 19/26] drm/mediatek: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 20/26] drm/kmb: dsi: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 21/26] drm/imx/ipuv3: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 22/26] drm/exynos: hdmi: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 23/26] drm/bridge: dw-hdmi: " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 24/26] drm/bridge: imx8qxp-pixel-link: simplify logic to find " Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 25/26] drm/bridge: imx8qxp-pixel-link: simplify freeing of the remote device_node Luca Ceresoli
2025-11-28 16:50   ` Luca Ceresoli
2025-11-28 16:50 ` [PATCH v2 26/26] drm/bridge: imx8qxp-pixel-link: convert to of_drm_get_bridge() Luca Ceresoli
2025-11-28 16:50   ` 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=DF0CCD6EW5DR.3CYNK65T1GSAO@bootlin.com \
    --to=luca.ceresoli@bootlin.com \
    --cc=Hui.Pu@gehealthcare.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=abrodkin@synopsys.com \
    --cc=adrien.grassein@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=andrzej.hajda@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=anitha.chrisanthus@intel.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=imx@lists.linux.dev \
    --cc=inki.dae@samsung.com \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@pengutronix.de \
    --cc=khilman@baylibre.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magnus.damm@gmail.com \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=ple@baylibre.com \
    --cc=rfoss@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sw0312.kim@samsung.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tomi.valkeinen+renesas@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    --cc=victor.liu@nxp.com \
    /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.