Message ID | 20220819140852.255187-4-marex@denx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v5,1/4] drm/lcdif: Clean up headers | expand |
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>
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)