lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad244133bdba4570b0b45871fd136350@codeaurora.org>
Date:   Fri, 08 Oct 2021 09:07:25 -0700
From:   khsieh@...eaurora.org
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Abhinav Kumar <abhinavk@...eaurora.org>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
        Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
        linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Sankeerth Billakanti <sbillaka@...eaurora.org>
Subject: Re: [PATCH] drm/msm/dp: Shorten SETUP timeout

On 2021-10-07 15:34, Stephen Boyd wrote:
> Quoting khsieh@...eaurora.org (2021-10-07 13:28:12)
>> On 2021-10-07 13:06, Bjorn Andersson wrote:
>> > On Thu 07 Oct 12:51 PDT 2021, khsieh@...eaurora.org wrote:
>> >
>> >> On 2021-10-06 10:31, Bjorn Andersson wrote:
>> >> > On Wed 06 Oct 08:37 PDT 2021, khsieh@...eaurora.org wrote:
>> >> >
>> >> > > On 2021-10-05 19:10, Bjorn Andersson wrote:
>> >> > > > On Tue 05 Oct 16:04 PDT 2021, khsieh@...eaurora.org wrote:
>> >> > > >
>> >> > > > > On 2021-10-05 15:36, Stephen Boyd wrote:
>> >> > > > > > Quoting Bjorn Andersson (2021-10-05 14:40:38)
>> >> > > > > > > On Tue 05 Oct 11:45 PDT 2021, Stephen Boyd wrote:
>> >> > > > > > >
>> >> > > > > > > > Quoting Bjorn Andersson (2021-10-04 19:37:50)
>> >> > > > > > > > > Found in the middle of a patch from Sankeerth was the reduction of the
>> >> > > > > > > > > INIT_SETUP timeout from 10s to 100ms. Upon INIT_SETUP timeout the host
>> >> > > > > > > > > is initalized and HPD interrupt start to be serviced, so in the case of
>> >> > > > > > > > > eDP this reduction improves the user experience dramatically - i.e.
>> >> > > > > > > > > removes 9.9s of bland screen time at boot.
>> >> > > > > > > > >
>> >> > > > > > > > > Suggested-by: Sankeerth Billakanti <sbillaka@...eaurora.org>
>> >> > > > > > > > > Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
>> >> > > > > > > > > ---
>> >> > > > > > > >
>> >> > > > > > > > Any Fixes tag? BTW, the delay design is pretty convoluted. I had to go
>> >> > > > > > > > re-read the code a couple times to understand that it's waiting 100ms
>> >> > > > > > > > times the 'delay' number. Whaaaaat?
>> >> > > > > > > >
>> >> > > > > > >
>> >> > > > > > > I assume you're happy with the current 10s delay on the current
>> >> > > > > > > devices, so I don't think we should push for this to be backported.
>> >> > > > > > > I have no need for it to be backported on my side at least.
>> >> > > > > > >
>> >> > > > > >
>> >> > > > > > Sure. Fixes tag != backported to stable trees but it is close.
>> >> > > > > >
>> >> > > > > > > > Reviewed-by: Stephen Boyd <swboyd@...omium.org>
>> >> > > > > > >
>> >> > > > >   dp_add_event(dp, EV_HPD_INIT_SETUP, 0, 1); <== to 100ms
>> >> > > > >
>> >> > > > > This patch will prevent usb3 from working due to dp driver
>> >> > > > > initialize phy
>> >> > > > > earlier than usb3 which cause timeout error at power up usb3 phy
>> >> > > > > when both
>> >> > > > > edp and dp are enabled.
>> >> > > >
>> >> > > > Can you please help me understand what you mean here, I use this on my
>> >> > > > sc8180x with both eDP and USB-C/DP right now. What is it that doesn't
>> >> > > > work? Or am I just lucky in some race condition?
>> >> > > >
>> >> > > > Thanks,
>> >> > > > Bjorn
>> >> > > >
>> >> > > The problem is seen at sc7280.
>> >> > > Apple dongle have both  hdmi and usb port.
>> >> > > plug Apple dongle into type-c, then plug DP into apple's hdmi port
>> >> > > and usb
>> >> > > mouse into apple's usb port.
>> >> > > If edp enabled at this time, then usb mouse will not work due to
>> >> > > timeout at
>> >> > > phy power up.
>> >> > >
>> >> >
>> >> > Okay, so you're saying that if the DP driver invokes phy_power_on()
>> >> > before the USB driver does, USB initialization fails (or at least USB
>> >> > doesn't work)?
>> >>
>> >> if dp driver call qcom_qmp_phy_init() before usb3 call
>> >> qcom_qmp_phy_init(),
>> >> usb3 driver will timeout at readl_poll_timeout(status, val, (val &
>> >> mask) ==
>> >> ready, 10, PHY_INIT_COMPLETE_TIMEOUT) of qcom_qmp_phy_power_on().
>> >
>> > Thanks, I will try to reproduce this on my side. So the 10 seconds here
>> > is strictly to give good enough time for the dwc3 driver to probe...
>> >
>> > Any idea why you're saying that this is specific to sc7280, what
>> > changed
>> > from sc7180?
>> 
>> I did not have sc7180 with edp before so that i am not sure it will
>> happen on sc7180 or not.
>> The usb3 does not work when both edp and dp enabled I just seen at
>> sc7280.
>> Current at sc7280 EC is not boot up correctly when system power up.
>> I have to manual reboot EC from linux kernel shell before DP/usb3 can
>> work.
>> I am not sure this contribute to this problem or not.
>> 
> 
> Can you make the usb driver into a module and only load that module
> later in boot after the DP driver calls qcom_qmp_phy_init()? That would
> be an easy way to move usb probe after DP probe and expose this 
> problem.

we need usb calls qcom_qmp_phy_init() before dp.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ