Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1777383pxb; Thu, 7 Oct 2021 15:07:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkfJR3L/YJ8Px0aRXYzjAGL89nFgzvQMyWrktqHM8/p1fa9G8Vn/wSrI8uCkTN8lDZYtn6 X-Received: by 2002:a17:906:a01:: with SMTP id w1mr9107066ejf.117.1633644475355; Thu, 07 Oct 2021 15:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633644475; cv=none; d=google.com; s=arc-20160816; b=fcCeEr9RHqNJ6PAJvtD8TkxlUxSY4g2OSSCZM+F30xaWroHV4L/aO3hwCcjsv6lzhF IA9ayqm0pCoXQn5eCY/8gUXPLIie/SRqDTIwArIWMCN32J0aue6JCJbihrqHfUn92FM/ Z9kkUgltSP8dx8nEvhPaeBBqqnFkcZnrhxNPmA0ZFiLwxb0JZg/GudSwjfUfzsIdpZHK RVS62cH9fP2xRwo8br1T3YHhJEvjEXxgZ+mr3qJ3Ce8Onq9Sz/YG1Ru/5hJZpLe3eUUn ouJcfLwoOW38QKSIgFOCcYjLa5EHlv2htQnZtkdjkdIN/cKapg7uhCGqyM9qAa+TqA8+ DRaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=y8koyWINUfzb802j4etgpILh+JOtc9mzcLwfHf8t16w=; b=MBwwwkpPqWODj2vn61SfD5ZKdOn/yDqOZ6N6i6Hnn6h0pQsX9mMLnB50togiSivKIN qZ/GcFZpEREWWTPS9OZyYFiHf7UwrP7VI9p9tlWGsYyKTkHPdOK9c8qRg5ks0FeGgtkq 2xWtszQV5NQISYh1YbLE5+3IDdEQO1OVEOFUAOtmnxM0iUJFUS9OpV0XoVTR6sFneKjr jSBygTh9trAyoh3Ix1EAXmClE9xc3W8L/6Nmx4+oPRnrVndp9VwYcfC97JQSY3LkzFoR pNfTYjMNZAFzXqTABJkoiso2u+Vdx9DFOTPS32O3qmUYHmqopwnxijieQxhakaJVoc9n ZV6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b="t77zx/bG"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si1050320edd.346.2021.10.07.15.07.31; Thu, 07 Oct 2021 15:07:55 -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=@mg.codeaurora.org header.s=smtp header.b="t77zx/bG"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233848AbhJGTxq (ORCPT + 99 others); Thu, 7 Oct 2021 15:53:46 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:20433 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233837AbhJGTxp (ORCPT ); Thu, 7 Oct 2021 15:53:45 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1633636311; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=y8koyWINUfzb802j4etgpILh+JOtc9mzcLwfHf8t16w=; b=t77zx/bG62IKDknYGlzAGvw+0H+Sr9yUYpNfAcam4ZrHo/Xuot/MXtNquGBDm/usg24xUh6I CHeyrpVTNmhdDSmvVCgTwYNNiuPje4dEGRneJwDSOevVnIa7nrKfWp6r9iEJrGfPme3LpYtQ Tdf29N1XcqM1ENlWbmzXHZygHRA= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 615f4fd7a45ca75307d973a1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 07 Oct 2021 19:51:51 GMT Sender: khsieh=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id CF2D0C43619; Thu, 7 Oct 2021 19:51:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: khsieh) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7920EC4338F; Thu, 7 Oct 2021 19:51:48 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 07 Oct 2021 12:51:48 -0700 From: khsieh@codeaurora.org To: Bjorn Andersson Cc: Stephen Boyd , 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 Subject: Re: [PATCH] drm/msm/dp: Shorten SETUP timeout In-Reply-To: References: <20211005023750.2037631-1-bjorn.andersson@linaro.org> <3dbe0fe48da88af9dee396a85b940e76@codeaurora.org> Message-ID: <9dc50145fb3e9b189fd38857b20f326a@codeaurora.org> X-Sender: khsieh@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(). > > Sounds like something we need to work out in the QMP phy driver. Do you > have any more details about what's going wrong. > > > Also, I've seen various references to said "Apple dongle", do you have > a > link to the exact one you're testing with so I can pick one up for > testing purposes as well? Apple A2119 hdmi+usb dongle. https://www.amazon.com/Apple-USB-C-Digital-Multiport-Adapter/dp/B07WF96FY5/ref=sr_1_2?dchild=1&keywords=apple+a2119&qid=1633636227&sr=8-2 > > Regards, > Bjorn > >> > > I had prepared a patch (drm/msm/dp: do not initialize combo phy >> > > until plugin >> > > interrupt) to fix this problem. >> > > Unfortunately, my patch is depend on Bjorn's patch (PATCH v3 3/5] >> > > drm/msm/dp: Support up to 3 DP controllers). >> > > I will submit my patch for review once Bjorn's patches merged in. >> > > Therefore I would think this patch should go after both Bjorn's >> > > patches and >> > > my patch. >> > > >> > > >> > >