On Mon, Dec 13, 2021 at 10:48 PM Maxime Ripard <max...@cerno.tech> wrote:
>
> On Fri, Dec 10, 2021 at 04:47:08PM +0530, Jagan Teki wrote:
> > Some display panels would come up with a non-DSI output, those
> > can have an option to connect the DSI host by means of interface
> > bridge converter.
> >
> > This DSI to non-DSI interface bridge converter would require
> > DSI Host to handle drm bridge functionalities in order to
> > communicate interface bridge.
> >
> > This patch adds support for bridge functionalities in Allwinner
> > DSI controller.
> >
> > Supporting down-stream bridge makes few changes in the driver.
> >
> > - It drops drm_connector and related operations as drm_bridge_attach
> >   creates connector during attachment.
> >
> > - It drop panel pointer and iterate the bridge, so-that it can operate
> >   the normal bridge and panel_bridge in constitutive callbacks.
> >
> > - It uses devm_drm_of_get_bridge for panel or bridge lookup. It uses
> >   port 0 and endpoint 0 to support I2C-based bridges eventhough the
> >   usual Allwinner DSI OF graph doesn't require this for panel and
> >   non-I2C based downstream bridges.
> >
> > Signed-off-by: Jagan Teki <ja...@amarulasolutions.com>
> > ---
> > Changes for v6:
> > - support donwstream bridge
> > - drop bridge conversion
> > - devm_drm_of_get_bridge() require child lookup
> > https://patchwork.kernel.org/project/dri-devel/cover/20211207054747.461029-1-ja...@amarulasolutions.com/
> > Changes for v5:
> > - add atomic APIs
> > - find host and device variant DSI devices.
> > Changes for v4, v3:
> > - none
> >
> >  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 83 ++++++++++----------------
> >  drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h |  9 +--
> >  2 files changed, 33 insertions(+), 59 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c 
> > b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > index 9cf91dcac3f2..f1d612bf1a0b 100644
> > --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
> > @@ -21,6 +21,7 @@
> >
> >  #include <drm/drm_atomic_helper.h>
> >  #include <drm/drm_mipi_dsi.h>
> > +#include <drm/drm_of.h>
> >  #include <drm/drm_panel.h>
> >  #include <drm/drm_print.h>
> >  #include <drm/drm_probe_helper.h>
> > @@ -720,6 +721,7 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder 
> > *encoder)
> >       struct mipi_dsi_device *device = dsi->device;
> >       union phy_configure_opts opts = { };
> >       struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy;
> > +     struct drm_bridge *iter;
> >       u16 delay;
> >       int err;
> >
> > @@ -769,8 +771,10 @@ static void sun6i_dsi_encoder_enable(struct 
> > drm_encoder *encoder)
> >       phy_configure(dsi->dphy, &opts);
> >       phy_power_on(dsi->dphy);
> >
> > -     if (dsi->panel)
> > -             drm_panel_prepare(dsi->panel);
> > +     list_for_each_entry(iter, &dsi->bridge_chain, chain_node) {
> > +             if (iter->funcs->pre_enable)
> > +                     iter->funcs->pre_enable(iter);
> > +     }
>
> Like we discussed in the previous version already, this is unnecessary,
> just like the poking at bridge_chain in the encoder.

Unlike previous patch, this patch not doing bridge conversion it is
supporting downstream bridge. Yes, it is possible to use bridge helper
for invoking downstream bridge enable when bridge functions added.

Thanks,
Jagan.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/CAMty3ZBXUart1GZod2v%3DbMv2xYxuDjkyEw-WZ8bMDsCLU1gVWA%40mail.gmail.com.

Reply via email to