[PATCH] drm/omap: switch to drm_of_find_panel_or_bridge

José Expósito jose.exposito89 at gmail.com
Thu Mar 3 18:11:46 UTC 2022


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


More information about the dri-devel mailing list