[linux-sunxi] [regression] fail to detect USB driver partition for OrangepiPC

2022-01-17 Thread zhang...@gmail.com

hi, All

I use same kernel config for both 5.15.14 and 5.16.0,

for 5.16.0, USB driver is detected, but failed to detect partition,
use strace fdisk -l /dev/sda , it blocked at open("/dev/sda")

occasionally it can detect partition, about 1/20 possibility.

thus I guess, it may related to boot order, but I don't know how to find it.

my kernel config: 
https://gitee.com/zhangn1985/config/raw/master/linux.arm.conf

BR.
Ning.

-- 
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/379ca32f-e0b0-4d09-8be6-cd0a96571867n%40googlegroups.com.


[linux-sunxi] Re: [PATCH v6 1/6] drm: sun4i: dsi: Drop DRM bind race with bridge attach

2022-01-17 Thread Jagan Teki
On Mon, Dec 13, 2021 at 10:32 PM Maxime Ripard  wrote:
>
> On Fri, Dec 10, 2021 at 04:47:06PM +0530, Jagan Teki wrote:
> > Existing host driver will keep looking for DRM pointer in
> > sun6i_dsi_attach and defers even if the particular DSI device
> > is found for the first time. Meanwhile it triggers the bind
> > callback and gets the DRM pointer and then continues the
> > sun6i_dsi_attach.
> >
> > This makes a deadlock situation if sun6i_dsi_attach is trying
> > to find the bridge.
>
> I'm not sure what you mean by deadlock here, there's no lock involved?

deadlock parse here for general understanding, where bind is trying to
attach bridge but drm pointer is not available that point and drm
pointer will available only when bind done. This is what I'm calling
as deadlock here.

Anyway, now I'm able to support both panel and bridge to support
hotplug so no need to drop the hotplug support.

Please let me know, if you have any questions so-that I can send next
version series.

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/CAMty3ZAetcXpcokJ418VGHzbi4ivJg4Rt0OVgh7WaZ6GAJQY1Q%40mail.gmail.com.


[linux-sunxi] Re: [PATCH v6 3/6] drm: sun4i: dsi: Add bridge support

2022-01-17 Thread Jagan Teki
On Mon, Dec 13, 2021 at 10:48 PM Maxime Ripard  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 
> > ---
> > 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 
> >  #include 
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -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 = _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, );
> >   phy_power_on(dsi->dphy);
> >
> > - if (dsi->panel)
> > - drm_panel_prepare(dsi->panel);
> > + list_for_each_entry(iter, >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.