2022-02-21 02:00:23

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

Hi Jos?,

On Sun, Feb 20, 2022 at 08:52:12PM +0100, Jos? Exp?sito wrote:
> Use the "drm_of_find_panel_or_bridge" function instead of a custom
> version of it to reduce the boilerplate.
Thanks for looking into this.


From the documentation of drm_of_find_panel_or_bridge():

* This function is deprecated and should not be used in new drivers. Use
* devm_drm_of_get_bridge() instead.

Are you OK to give this a second try with the above referenced function?

There is a good chance the deprecation happened after you looked into
this first, sometimes things moves fast in the drm sub-system.

Sam


2022-03-03 20:21:39

by José Expósito

[permalink] [raw]
Subject: Re: [PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

On Sun, Feb 20, 2022 at 10:36:35PM +0100, Sam Ravnborg wrote:
> Hi Jos?,
>
> On Sun, Feb 20, 2022 at 08:52:12PM +0100, Jos? Exp?sito wrote:
> > Use the "drm_of_find_panel_or_bridge" function instead of a custom
> > version of it to reduce the boilerplate.
> Thanks for looking into this.

Hi Sam,

Thanks for your quick review, and sorry for the error in my patch.
I thought my toolchain was properly configured, but it wasn't and
I missed an include:

#include <drm/drm_bridge.h>
+#include <drm/drm_of.h>
#include <drm/drm_panel.h>

I apologize for the mistake.

> From the documentation of drm_of_find_panel_or_bridge():
>
> * This function is deprecated and should not be used in new drivers. Use
> * devm_drm_of_get_bridge() instead.
>
> Are you OK to give this a second try with the above referenced function?
>
> There is a good chance the deprecation happened after you looked into
> this first, sometimes things moves fast in the drm sub-system.
>
> Sam

I'm getting started in the DRM subsystem, so I might have overlooked
a function, but I think that in this case, since we need to store the
panel in "out->panel" we can not use "devm_drm_of_get_bridge".

"devm_drm_of_get_bridge" returns the bridge and I didn't find a way
to access the panel from it... But as I mentioned, I probably
overlooked the required function or pointer.

Thanks again for your review,
Jose