From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marex@denx.de>, Peng Fan <peng.fan@nxp.com>,
Liu Ying <victor.liu@nxp.com>,
robert.foss@linaro.org, Liu Ying <victor.liu@oss.nxp.com>,
Martyn Welch <martyn.welch@collabora.com>,
dri-devel@lists.freedesktop.org, Sam Ravnborg <sam@ravnborg.org>,
Robby Cai <robby.cai@nxp.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH v5 4/4] drm/lcdif: switch to devm_drm_of_get_bridge
Date: Mon, 22 Aug 2022 08:34:32 +0200 [thread overview]
Message-ID: <1829829.tdWV9SEqCh@steina-w> (raw)
In-Reply-To: <20220819140852.255187-4-marex@denx.de>
Hello Marek,
Am Freitag, 19. August 2022, 16:08:52 CEST schrieb Marek Vasut:
> 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.
>
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> Reviewed-by: Liu Ying <victor.liu@nxp.com>
> Reported-by: Liu Ying <victor.liu@oss.nxp.com>
> Tested-by: Martyn Welch <martyn.welch@collabora.com>
> Fixes: 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIF variant")
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Liu Ying <victor.liu@nxp.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Martyn Welch <martyn.welch@collabora.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Robby Cai <robby.cai@nxp.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Stefan Agner <stefan@agner.ch>
> ---
> V2: Add RB from Liu
> V3: Add TB from Martyn from V1
> V4: Add AB from Sam from V2
> V5: Rebase on current drm-misc-next
> ---
> drivers/gpu/drm/mxsfb/lcdif_drv.c | 18 +++---------------
> 1 file changed, 3 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c
> b/drivers/gpu/drm/mxsfb/lcdif_drv.c index 4f16947212b60..075002ed6fb09
> 100644
> --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c
> +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c
> @@ -42,23 +42,11 @@ static int lcdif_attach_bridge(struct lcdif_drm_private
> *lcdif) {
> struct drm_device *drm = lcdif->drm;
> struct drm_bridge *bridge;
> - struct drm_panel *panel;
> int ret;
>
> - ret = drm_of_find_panel_or_bridge(drm->dev->of_node, 0, 0, &panel,
> - &bridge);
> - if (ret)
> - return ret;
> -
> - if (panel) {
> - bridge = devm_drm_panel_bridge_add_typed(drm->dev,
panel,
> -
DRM_MODE_CONNECTOR_DPI);
> - if (IS_ERR(bridge))
> - return PTR_ERR(bridge);
> - }
> -
> - if (!bridge)
> - return -ENODEV;
> + bridge = devm_drm_of_get_bridge(drm->dev, drm->dev->of_node, 0, 0);
> + if (IS_ERR(bridge))
> + return PTR_ERR(bridge);
>
> ret = drm_bridge_attach(&lcdif->encoder, bridge, NULL, 0);
> if (ret)
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
next prev parent reply other threads:[~2022-08-22 6:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 14:08 [PATCH v5 1/4] drm/lcdif: Clean up headers Marek Vasut
2022-08-19 14:08 ` [PATCH v5 2/4] drm/lcdif: Consistently use plain timings Marek Vasut
2022-08-19 14:08 ` [PATCH v5 3/4] drm/lcdif: Clean up debug prints and comments Marek Vasut
2022-08-22 6:24 ` Alexander Stein
2022-08-22 10:37 ` Marek Vasut
2022-08-19 14:08 ` [PATCH v5 4/4] drm/lcdif: switch to devm_drm_of_get_bridge Marek Vasut
2022-08-22 6:34 ` Alexander Stein [this message]
2022-08-22 6:19 ` [PATCH v5 1/4] drm/lcdif: Clean up headers Alexander Stein
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=1829829.tdWV9SEqCh@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=marex@denx.de \
--cc=martyn.welch@collabora.com \
--cc=peng.fan@nxp.com \
--cc=robby.cai@nxp.com \
--cc=robert.foss@linaro.org \
--cc=sam@ravnborg.org \
--cc=victor.liu@nxp.com \
--cc=victor.liu@oss.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 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).