Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1796947pxb; Thu, 7 Oct 2021 15:37:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCYYm3y3uOWKgDUjuaBgsywnYhra42TGIaWzbl7J18NKuBTROs3PCOR2Vt+Irhr2KCTkVN X-Received: by 2002:a17:90a:1a19:: with SMTP id 25mr8391089pjk.34.1633646221680; Thu, 07 Oct 2021 15:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633646221; cv=none; d=google.com; s=arc-20160816; b=FDb14Nt1tIw9oUHkemZa7E3EckxWIXBzMPvfdbD3FOjL9imt4hmHbGz+Rcl8SdpzlP Ptad/Qs17eM7NaCXQL9se7rCoQo885MU0TnWZQ/wJEgBy0oTI5R9Mg+w87esNzrcl07q +XZablxBNPzK8PJHGyhUIRqvwFUFXwo5dDCFayJyZd75lk9wJdskLYgohUWrTrBAKBjb IxrFGo/JaSzaXDhc9Uqv+JDN4eAL/Q9a18Zu/8/JUXLO3MCLfwaiI0Sv/RsR7BvV0kkL PFCOcnmRuh6apts4+dsAPKHh5ojVR82AEiY+UmiAK0clDAKA/TgehSCzm9xF2WESEy1b 7ZiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=xvLkmQK9Bybd4TfsJEOa13aU7h3LNEaMsTOh+C5eBTg=; b=bLOqoomfOpEuF/cj/BqCiWW9Ix3UR2q/frfCNmztLxPFzIwdoEngj1nl8Tb4B5q3T4 HYi2EuTXJbj2VE/3o8HrGk94Ul7hc0AB5M2fSyEzwQJsP1XpR1tjsxk7debwYMV0UPnA 6QljBzfCxF8kKlXFRUZ7dlblfe0mpojz0SzJv/U8FIC6OBKEg78Z7G6N3SCNrVk6aO0x /FJr42weWpeY/yjcr5FLwTrlgGE/0Mu+zpMvhPKiS6mHUqEGfQw/2EepBF0yYNbps2mA ur2k7ojG66pLdVOhdHFwxwdFS6ZjqwVlS169HY5+We87faZd1Ff1fTHGMR5lBd2Lc/Ec +h+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RrC+LQ4p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j64si753821pgd.127.2021.10.07.15.36.43; Thu, 07 Oct 2021 15:37:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RrC+LQ4p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233459AbhJGWgt (ORCPT + 99 others); Thu, 7 Oct 2021 18:36:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233090AbhJGWgt (ORCPT ); Thu, 7 Oct 2021 18:36:49 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E48DFC061570 for ; Thu, 7 Oct 2021 15:34:54 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id h11-20020a4aa74b000000b002a933d156cbso2369641oom.4 for ; Thu, 07 Oct 2021 15:34:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc; bh=xvLkmQK9Bybd4TfsJEOa13aU7h3LNEaMsTOh+C5eBTg=; b=RrC+LQ4p5RknyhummIEgUPYOa5Fz91+AtAnA3rEUlbkmAuwRbsdE6lfznJHa0LlbJD gHeKxZrbTLMQqWWXvsiNBMMeaRwgA2mRA/n0nVIfo+Vcylr2NHZLoSz93AavNudYmQay JhoZXgGqu43xpmqTbQ4Z52i8Am0AOPbAQSlwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=xvLkmQK9Bybd4TfsJEOa13aU7h3LNEaMsTOh+C5eBTg=; b=BLJxYmAAvi2Nx9mX+ZO4SZ7mXkjgfr1FKpLmrKhv2pR1sBQYP/C6wzkOQYvAglTjPn d/WhJi6MX6BLhNYggvCnKLyOwexgx94N1wc+yl8Bh/XRW/KC5afqvz5C0RoRuTGv8mDD PjDLVrn3HlUckFv4Yl2gND03Fp9aJKzSQG7kh+8N+ReRwvPSVsXMyGY//mYFsDa781yj Cu9YmEo9h6G1w43div5M+4kpHuQwEzfnX3kXBfIBkX7To1MHIgUqR5f6uUoT2XM7VGvF QXlAaNfkFwa0dnTdt7NrGjgkbfMaBh+22XzrqOb4xefD233h616amZUYWL5RgigkeIvF 1b8w== X-Gm-Message-State: AOAM531MjHqyP4bOrZKGCx4QYisp6oT/+o8vc5/BOBRM8l8RyRUGy8Eh Ui8wDtaKy9F9nvOL1BIuZLq+qgQgQmTDcpdh/LiMzQ== X-Received: by 2002:a4a:e2d3:: with SMTP id l19mr5401226oot.1.1633646094225; Thu, 07 Oct 2021 15:34:54 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 7 Oct 2021 18:34:53 -0400 MIME-Version: 1.0 In-Reply-To: <0c72f3fd8c49cdada09bb6ee366b53a6@codeaurora.org> References: <20211005023750.2037631-1-bjorn.andersson@linaro.org> <3dbe0fe48da88af9dee396a85b940e76@codeaurora.org> <9dc50145fb3e9b189fd38857b20f326a@codeaurora.org> <0c72f3fd8c49cdada09bb6ee366b53a6@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Thu, 7 Oct 2021 18:34:53 -0400 Message-ID: Subject: Re: [PATCH] drm/msm/dp: Shorten SETUP timeout To: Bjorn Andersson , khsieh@codeaurora.org Cc: Abhinav Kumar , Daniel Vetter , David Airlie , Dmitry Baryshkov , Rob Clark , Sean Paul , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sankeerth Billakanti Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting khsieh@codeaurora.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@codeaurora.org wrote: > > > >> On 2021-10-06 10:31, Bjorn Andersson wrote: > >> > On Wed 06 Oct 08:37 PDT 2021, khsieh@codeaurora.org wrote: > >> > > >> > > On 2021-10-05 19:10, Bjorn Andersson wrote: > >> > > > On Tue 05 Oct 16:04 PDT 2021, khsieh@codeaurora.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 > >> > > > > > > > > Signed-off-by: Bjorn Andersson > >> > > > > > > > > --- > >> > > > > > > > > >> > > > > > > > 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 > >> > > > > > > > >> > > > > 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.