From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Maxime Ripard" <mripard@kernel.org>
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>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Kevin Hilman" <khilman@baylibre.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.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>,
"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>,
"Hui Pu" <Hui.Pu@gehealthcare.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<linux-amlogic@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>, <imx@lists.linux.dev>,
<linux-mediatek@lists.infradead.org>,
<linux-samsung-soc@vger.kernel.org>,
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 5/6] drm/exynos: hdmi: convert to of_drm_find_and_get_bridge()
Date: Thu, 08 Jan 2026 11:13:33 +0100 [thread overview]
Message-ID: <DFJ4MHZJ1DTL.10AMTN5NW6VGS@bootlin.com> (raw)
In-Reply-To: <20260108-acoustic-groovy-shark-1c6850@houat>
Hi Maxime,
On Thu Jan 8, 2026 at 9:14 AM CET, Maxime Ripard wrote:
> On Wed, Jan 07, 2026 at 05:22:03PM +0100, Luca Ceresoli wrote:
>> of_drm_find_bridge() is deprecated. Move to its replacement
>> of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it
>> is put when done.
>>
>> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
>
> Why can't we use next_bridge for this one?
Because this device is not a bridge, so we have no struct drm_bridge.
>> ---
>> drivers/gpu/drm/exynos/exynos_hdmi.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> index 01813e11e6c6..bfcf2fa62fe1 100644
>> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
>> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
>> @@ -1779,7 +1779,7 @@ static int hdmi_bridge_init(struct hdmi_context *hdata)
>> return -EINVAL;
>> }
>>
>> - hdata->bridge = of_drm_find_bridge(np);
>> + hdata->bridge = of_drm_find_and_get_bridge(np);
>> of_node_put(np);
>>
>> if (!hdata->bridge)
>> @@ -2096,6 +2096,8 @@ static void hdmi_remove(struct platform_device *pdev)
>>
>> put_device(&hdata->ddc_adpt->dev);
>>
>> + drm_bridge_put(hdata->bridge);
>> +
>> mutex_destroy(&hdata->mutex);
>> }
>
> Same story than in your part 2 series, it should be dropped in destroy.
hdata->bridge is only used for drm_bridge_attach(), it won't be referenced
after that. So this is safe, unless I'm missing something.
Also as we don't have a struct drm_bridge (as mentioned above) we have no
bridge destroy. We have the encoder destroy, but that will never be called
on bridge hotplug.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-01-08 10:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 16:21 [PATCH 0/6] drm/bridge: convert users of of_drm_find_bridge(), part 3 Luca Ceresoli
2026-01-07 16:21 ` [PATCH 1/6] drm/bridge: dw-hdmi: convert to of_drm_find_and_get_bridge() Luca Ceresoli
2026-01-08 8:10 ` Maxime Ripard
2026-01-07 16:22 ` [PATCH 2/6] drm/meson/dw-hdmi: " Luca Ceresoli
2026-01-08 8:13 ` Maxime Ripard
2026-01-07 16:22 ` [PATCH 3/6] drm/imx/dw-hdmi: " Luca Ceresoli
2026-01-07 16:34 ` Philipp Zabel
2026-01-07 17:03 ` Luca Ceresoli
2026-01-07 16:22 ` [PATCH 4/6] drm/mediatek: mtk_hdmi*: " Luca Ceresoli
2026-01-08 8:13 ` Maxime Ripard
2026-01-07 16:22 ` [PATCH 5/6] drm/exynos: hdmi: " Luca Ceresoli
2026-01-08 8:14 ` Maxime Ripard
2026-01-08 10:13 ` Luca Ceresoli [this message]
2026-01-08 9:51 ` Marek Szyprowski
2026-01-07 16:22 ` [PATCH 6/6] drm: rcar-du: lvds: " 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=DFJ4MHZJ1DTL.10AMTN5NW6VGS@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Hui.Pu@gehealthcare.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=alim.akhtar@samsung.com \
--cc=andrzej.hajda@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--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-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=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=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 \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).