drm_panel_get_modes() should take the connector as an argument [Was: drm/bridge: panel: Implement bridge ...]
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Aug 8 16:07:26 UTC 2019
Hi Sam,
On Tue, Jul 16, 2019 at 01:08:27PM +0200, Sam Ravnborg wrote:
> Hi Laurent et all.
>
> > +static int panel_bridge_get_modes(struct drm_bridge *bridge,
> > + struct drm_connector *connector)
> > +{
> > + struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
> > +
> > + /*
> > + * FIXME: drm_panel_get_modes() should take the connector as an
> > + * argument.
> > + */
> > + return drm_panel_get_modes(panel_bridge->panel);
> > +}
>
> I took a look at this - it seems simple:
> - Update drm_panel.get_modes() to take controller as argument, and fix
I assume you meant connector, not controller.
> all callers. All callers already have connector available.
> - Drop drm_panel_attach(), drm_panel_detach() and update all callers.
> In reality just drop all code around attach(), detach().
> drm_panel_attach(), drm_panel_detach() will be noops when the
> connector stored in drm_panel is no longer used.
>
> The semantic difference is that we supply the connector when we call
> drm_panel_get_modes() and not at panel creation time with an drm_panel_attach().
>
> So it should be doable without any migration from one world to the other.
>
> If someone can say "yes it should be that simple", then I will
> give it a spin.
Looking forward to that :-)
--
Regards,
Laurent Pinchart
More information about the dri-devel
mailing list