RE: [PATCH v6 6/8] drm/msm/dp: remove unnecessary delay during boot
From: Sankeerth Billakanti (QUIC)
Date: Thu Apr 07 2022 - 08:40:59 EST
Hi Dmitry,
> > > On Wed, Mar 30, 2022 at 9:04 AM Sankeerth Billakanti
> > > <quic_sbillaka@xxxxxxxxxxx> wrote:
> > > >
> > > > Remove the unnecessary delay in executing the EV_HPD_INIT_SETUP
> > > event.
> > >
> > > Tell me more and put it in the commit message! Why did it used to be
> > > necessary and why is it no longer necessary? Inquiring minds want to
> know.
> > >
> >
> > Okay. I will add proper description. The DP phy is shared with usb and
> > executing the dp phy_init before the usb phy_init was causing usb devices
> to not function.
>
> I always wondered, how does this work for the 4-lane DP dongles, where
> there is no USB mode/lanes?
>
For 4 lane DP, the DP driver overrides the phy programming. For 2 lanes
DP, the usb phy programming is leveraged.
I believe the usb controller needs to enable both usb3 (qmp phy) and usb2
(hs phy) before DP phy_init. If one of the usb phy init fails, the usb controller
will not enumerate and will cause usb2 devices (like keyboard or mouse) to
not work. The usb controller probe was failing because DP was turning on
(voting) a clock which was supposed to be initialized by the usb driver.
We did not see any issue with DP because the programming anyway gets
overwritten but due to usb controller failure, usb devices did not work.
> > Earlier, enabling phy_init was done when the EV_HPD_INIT_SETUP event
> was executed.
> > So, we had scheduled it to execute after 10 second to let the usb driver
> complete the phy_init first.
> >
> > Kuogee made the below change to move the DP phy_init to execute after
> > the DP is connected
> > https://patchwork.kernel.org/project/linux-arm-msm/patch/1642531648-
> 84
> > 48-2-git-send-email-quic_khsieh@xxxxxxxxxxx/
> >
> > So, there is no need for the DP driver to wait 10 seconds for the phy
> initialization anymore.
> >
> > eDP PHY is not shared with usb. So, it can be programmed anytime, hence
> not needing any delay.
>
>
>
> --
> With best wishes
> Dmitry