2022-02-21 08:53:39

by José Expósito

[permalink] [raw]
Subject: [PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

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 <[email protected]>
---
drivers/gpu/drm/msm/dp/dp_parser.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c
index a7acc23f742b..0951752e2d98 100644
--- a/drivers/gpu/drm/msm/dp/dp_parser.c
+++ b/drivers/gpu/drm/msm/dp/dp_parser.c
@@ -268,16 +268,8 @@ static int dp_parser_clock(struct dp_parser *parser)
static int dp_parser_find_panel(struct dp_parser *parser)
{
struct device *dev = &parser->pdev->dev;
- struct drm_panel *panel;
- int rc;

- rc = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
- if (rc) {
- DRM_ERROR("failed to acquire DRM panel: %d\n", rc);
- return rc;
- }
-
- parser->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
+ parser->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0);
if (IS_ERR(parser->panel_bridge)) {
DRM_ERROR("failed to create panel bridge\n");
return PTR_ERR(parser->panel_bridge);
--
2.25.1


2022-02-22 05:16:28

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

On Mon, Feb 21, 2022 at 08:33:39AM +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 <[email protected]>

Reviewed-by: Maxime Ripard <[email protected]>

Maxime


Attachments:
(No filename) (353.00 B)
signature.asc (235.00 B)
Download all attachments

2022-02-22 21:41:22

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

Quoting José Expósito (2022-02-20 23:33:39)
> 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 <[email protected]>
> ---

Dmitry is rewriting this code in a larger series. This patch is
superseded by that work.

2022-02-28 20:04:31

by José Expósito

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

On Tue, Feb 22, 2022 at 09:07:49PM +0000, Stephen Boyd wrote:
> Quoting Jos? Exp?sito (2022-02-20 23:33:39)
> > 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 <[email protected]>
> > ---
>
> Dmitry is rewriting this code in a larger series. This patch is
> superseded by that work.

Thanks for the heads up Stephen, it is indeed superseded by [0].

And thanks for the review Maxime.

[0] https://lore.kernel.org/dri-devel/[email protected]/