mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liu Ying <victor.liu@oss.nxp.com>
To: "José Expósito" <jose.exposito89@gmail.com>, andrzej.hajda@intel.com
Cc: jonas@kwiboo.se, airlied@linux.ie, robert.foss@linaro.org,
	dri-devel@lists.freedesktop.org, narmstrong@baylibre.com,
	linux-kernel@vger.kernel.org, jernej.skrabec@gmail.com,
	Laurent.pinchart@ideasonboard.com, maxime@cerno.tech
Subject: Re: [PATCH] drm/bridge: nwl-dsi: switch to devm_drm_of_get_bridge
Date: Tue, 01 Mar 2022 17:07:08 +0800	[thread overview]
Message-ID: <e69997e327e7c259925efa43138a807277c520fd.camel@oss.nxp.com> (raw)
In-Reply-To: <20220228182226.21888-1-jose.exposito89@gmail.com>

Hi,

On Mon, 2022-02-28 at 19:22 +0100, José Expósito wrote:
> The function "drm_of_find_panel_or_bridge" has been deprecated in
> favor of "devm_drm_of_get_bridge".
> 
> Switch to the new function and reduce boilerplate.
> 
> Signed-off-by: José Expósito <jose.exposito89@gmail.com>

This doesn't apply to the latest drm-misc-next due to conflict with
commit 7b1534188c25 ("drm: bridge: nwl-dsi: Drop panel_bridge from
nwl_dsi").

> ---
>  drivers/gpu/drm/bridge/nwl-dsi.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c
> index af07eeb47ca0..df3be9dd24fb 100644
> --- a/drivers/gpu/drm/bridge/nwl-dsi.c
> +++ b/drivers/gpu/drm/bridge/nwl-dsi.c
> @@ -909,19 +909,12 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge,
>  {
>  	struct nwl_dsi *dsi = bridge_to_dsi(bridge);
>  	struct drm_bridge *panel_bridge;
> -	struct drm_panel *panel;
> -	int ret;
>  
> -	ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel,
> -					  &panel_bridge);
> -	if (ret)
> -		return ret;
> +	panel_bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node,
> +					      1, 0);
> +	if (IS_ERR(panel_bridge))
> +		return PTR_ERR(panel_bridge);

Now that panel_bridge is resource managed, why not remove
drm_of_panel_bridge_remove() and its caller nwl_dsi_bridge_detach()?

Regards,
Liu Ying

>  
> -	if (panel) {
> -		panel_bridge = drm_panel_bridge_add(panel);
> -		if (IS_ERR(panel_bridge))
> -			return PTR_ERR(panel_bridge);
> -	}
>  	dsi->panel_bridge = panel_bridge;
>  
>  	if (!dsi->panel_bridge)


      reply	other threads:[~2022-03-01  9:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 18:22 José Expósito
2022-03-01  9:07 ` Liu Ying [this message]

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=e69997e327e7c259925efa43138a807277c520fd.camel@oss.nxp.com \
    --to=victor.liu@oss.nxp.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=jose.exposito89@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    /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®