mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul.cercueil@bootlin.com>
To: "Luca Ceresoli" <luca.ceresoli@bootlin.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>, "Frank Li" <Frank.Li@nxp.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Icenowy Zheng" <zhengxingda@iscas.ac.cn>,
	"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>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>
Cc: Arnd Bergmann <arnd@kernel.org>,
	Doug Anderson <dianders@chromium.org>,
	 Hui Pu <Hui.Pu@gehealthcare.com>,
	Ian Ray <ian.ray@gehealthcare.com>,
	Thomas Petazzoni	 <thomas.petazzoni@bootlin.com>,
	dri-devel@lists.freedesktop.org, 	imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
		linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 5/7] drm/vc4: dpi: stop using deprecated drmm_of_get_bridge()
Date: Thu, 01 Oct 2026 10:22:13 +0200	[thread overview]
Message-ID: <accaa9f4ad05ef73071e5cfb5368fcbdd394d3ab.camel@bootlin.com> (raw)
In-Reply-To: <20260929-drm-fix-of_get_bridge-build-regression-v2-5-6da431d8f180@bootlin.com>

Hi Luca,

Le mardi 29 septembre 2026 à 15:39 +0200, Luca Ceresoli a écrit :
> drmm_of_get_bridge() is deprecated, switch to
> of_drm_get_bridge_by_endpoint(). As of_drm_get_bridge_by_endpoint() returns
> a refcounted bridge, ensure it is put.
> 
> drm_panel.h becomes unused, drop the include.
> 
> Also remove a comment that is now obvious: now panels are just bridges.
> 
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
>  drivers/gpu/drm/vc4/vc4_dpi.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
> index 53f36626a50d..5060eb463704 100644
> --- a/drivers/gpu/drm/vc4/vc4_dpi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
> @@ -16,7 +16,6 @@
>  #include <drm/drm_drv.h>
>  #include <drm/drm_edid.h>
>  #include <drm/drm_of.h>
> -#include <drm/drm_panel.h>
>  #include <drm/drm_print.h>
>  #include <drm/drm_probe_helper.h>
>  #include <drm/drm_simple_kms_helper.h>
> @@ -279,16 +278,12 @@ static const struct of_device_id vc4_dpi_dt_match[] = {
>  	{}
>  };
>  
> -/* Sets up the next link in the display chain, whether it's a panel or
> - * a bridge.
> - */

The first part of the comment is not wrong, I would keep "Sets up the next link
in the display chain".

>  static int vc4_dpi_init_bridge(struct vc4_dpi *dpi)
>  {
> -	struct drm_device *drm = dpi->encoder.base.dev;
>  	struct device *dev = &dpi->pdev->dev;
> -	struct drm_bridge *bridge;
>  
> -	bridge = drmm_of_get_bridge(drm, dev->of_node, 0, 0);
> +	struct drm_bridge *bridge __free(drm_bridge_put) =
> +		of_drm_get_bridge_by_endpoint(dev->of_node, 0, 0);
>  	if (IS_ERR(bridge)) {
>  		/* If nothing was connected in the DT, that's not an
>  		 * error.

It could make sense to go the extra mile and just move that code back into the
caller function, I don't see much benefit in having it in a static function
here.

Cheers,
-Paul

  reply	other threads:[~2026-10-01  8:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 13:39 [PATCH v2 0/7] drm: remove deprecated *_of_get_bridge() from non-OF drivers (fixes build regression) Luca Ceresoli
2026-09-29 13:39 ` [PATCH v2 1/7] drm/imx/lcdc: stop using deprecated devm_drm_of_get_bridge() Luca Ceresoli
2026-10-01  8:02   ` Paul Cercueil
2026-09-29 13:39 ` [PATCH v2 2/7] drm: verisilicon: " Luca Ceresoli
2026-09-29 14:42   ` Icenowy Zheng
2026-09-29 21:26     ` Luca Ceresoli
2026-10-01  8:04   ` Paul Cercueil
2026-09-29 13:39 ` [PATCH v2 3/7] drm/bridge: dw-mipi-dsi: " Luca Ceresoli
2026-10-01  8:07   ` Paul Cercueil
2026-09-29 13:39 ` [PATCH v2 4/7] drm/bridge: dw-mipi-dsi2: " Luca Ceresoli
2026-10-01  8:10   ` Paul Cercueil
2026-09-29 13:39 ` [PATCH v2 5/7] drm/vc4: dpi: stop using deprecated drmm_of_get_bridge() Luca Ceresoli
2026-10-01  8:22   ` Paul Cercueil [this message]
2026-10-01  8:31     ` Luca Ceresoli
2026-09-29 13:39 ` [PATCH v2 6/7] drm/vc4: dsi: " Luca Ceresoli
2026-10-01  8:56   ` Paul Cercueil
2026-10-01  9:02     ` Paul Cercueil
2026-09-29 13:39 ` [PATCH v2 7/7] drm: renesas: shmobile: stop using deprecated devm_drm_of_get_bridge() Luca Ceresoli
2026-10-01  9:00   ` Paul Cercueil

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=accaa9f4ad05ef73071e5cfb5368fcbdd394d3ab.camel@bootlin.com \
    --to=paul.cercueil@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=Hui.Pu@gehealthcare.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=arnd@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=ian.ray@gehealthcare.com \
    --cc=imx@lists.linux.dev \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel-list@raspberrypi.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=simona@ffwll.ch \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    --cc=zhengxingda@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®