From: <Manikandan.M@microchip.com>
To: <Ludovic.Desroches@microchip.com>, <Dharma.B@microchip.com>,
<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
<tzimmermann@suse.de>, <airlied@gmail.com>, <simona@ffwll.ch>,
<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<claudiu.beznea@tuxon.dev>
Cc: <dri-devel@lists.freedesktop.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()
Date: Mon, 5 Jan 2026 06:20:52 +0000 [thread overview]
Message-ID: <c477520f-0ac9-48ee-9c84-21df015c5b79@microchip.com> (raw)
In-Reply-To: <20251218-lcd_cleanup_mainline-v2-5-df837aba878f@microchip.com>
On 18/12/25 6:56 pm, Ludovic Desroches wrote:
> Get rid of drm_of_find_panel_or_bridge() as it is deprecated and use
> devm_drm_of_get_bridge() instead.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 25 +++++-------------------
> 1 file changed, 5 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> index e582315f70a119f2b39057ff112bc427117b85f5..e8aea905fb10d20d89c0cfd7937039b44d8a55b7 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> @@ -69,16 +69,14 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
> {
> struct atmel_hlcdc_rgb_output *output;
> struct device_node *ep;
> - struct drm_panel *panel;
> struct drm_bridge *bridge;
> struct atmel_hlcdc_dc *dc = dev->dev_private;
> struct drm_crtc *crtc = dc->crtc;
> - int ret;
> + int ret = 0;
>
> - ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
> - &panel, &bridge);
> - if (ret)
> - return ret;
> + bridge = devm_drm_of_get_bridge(dev->dev, dev->dev->of_node, 0, endpoint);
> + if (IS_ERR(bridge))
> + return PTR_ERR(bridge);
>
> output = drmm_simple_encoder_alloc(dev, struct atmel_hlcdc_rgb_output,
> encoder, DRM_MODE_ENCODER_NONE);
> @@ -97,23 +95,10 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
> }
>
>
> -
> - if (panel) {
> - bridge = drm_panel_bridge_add_typed(panel,
> - DRM_MODE_CONNECTOR_Unknown);
> - if (IS_ERR(bridge))
> - return PTR_ERR(bridge);
> - }
> output->encoder.possible_crtcs = drm_crtc_mask(crtc);
>
> - if (bridge) {
> + if (bridge)
> ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);
> - if (!ret)
> - return 0;
> -
> - if (panel)
> - drm_panel_bridge_remove(bridge);
> - }
>
> return ret;
> }
>
--
Thanks and Regards,
Manikandan M.
next prev parent reply other threads:[~2026-01-05 6:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
2025-12-18 13:25 ` [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 3/8] drm/atmel-hlcdc: use drmm_simple_encoder_alloc() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 4/8] drm/atmel-hlcdc: use drm_crtc_mask() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge() Ludovic Desroches
2026-01-05 6:20 ` Manikandan.M [this message]
2025-12-18 13:26 ` [PATCH v2 6/8] drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 7/8] drm/atmel-hlcdc: use drmm_universal_plane_alloc() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback Ludovic Desroches
2026-01-05 6:24 ` Manikandan.M
2026-01-20 11:22 ` [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Manikandan.M
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=c477520f-0ac9-48ee-9c84-21df015c5b79@microchip.com \
--to=manikandan.m@microchip.com \
--cc=Dharma.B@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=airlied@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--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
Powered by JetHome