Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3688273pxj; Mon, 24 May 2021 12:23:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8vWdKAtKVp2NRWKozXGvrJvywL2D6+j+Avbsxof1XKs8oLv9eIHPxi4q0KJ9ex3ZhHdsz X-Received: by 2002:a17:906:ccde:: with SMTP id ot30mr25573550ejb.353.1621884226062; Mon, 24 May 2021 12:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621884226; cv=none; d=google.com; s=arc-20160816; b=XNcZ3msgby2YAMlzyMSGkI34j2y6SIRZseaKK7osuHgzNHsdKmoaxDznmsJDKn9J7J 6rWr11XcAyLmKiVQn/brIRrAgRiZ68/u77AAU+bZ+VBKAv2CzmJKflrup/46sSAHSaLu jTxSod2mrfL8ajTeLvyo/F/NJOQZvGS2nZZ68k2tSe+s/4TyllGeHG/p+vI/MCELBlxZ 6ZKSsjM9TPF+i868mrZnEUFAqCJ5MpudPOPO0BtbrXfwL5aSZGRITfwmGn+nUdO9fi+4 vUbaGcLxC9t0qJexiHJYK6HZPLVyCqQB7uMquF4JirxVVeL1cJl7c6FaXRpw6V5+nIlI xaqA== 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=AsmfRYALyOOPiklFnGLxIxG22/ZrSMjEGdTaIKdv2bU=; b=UW9+iABxSCgMlbcy38O/46t/M6UAU+CMAGahUUnOjHnjNMMQR8fLaj8jBEWu3BGYhh rUeTf5gSk30BsvyZ3wiwF7U+6px7tKcpYiwdUNrCL9wPdtIWgBD02BGneOuRuqOVxeVz /OAxSpsn0VoYx5XPVXFxsniR+1mvhR4B4y/vJ2UFReW8lCCXEW6Wmm9XlfbVEIE24bdc ql/ki3a4tVTINOJH33zIf/vufy5l0aL9KQAUZ5jPaVwRH1fyI481N/BUsHhOKEJ1BFJX G8qXf0w1HA9YbbvDmFUY4qIS8rO6mBKuVG72jHTmOKB2LDxzjNy1hrD6gxdVG4SlmfVP Nx3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z6K9qOtH; 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 5si13710228ejw.423.2021.05.24.12.23.20; Mon, 24 May 2021 12:23:46 -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=Z6K9qOtH; 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 S233564AbhEXTUo (ORCPT + 99 others); Mon, 24 May 2021 15:20:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233561AbhEXTUm (ORCPT ); Mon, 24 May 2021 15:20:42 -0400 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 653A3C061756 for ; Mon, 24 May 2021 12:19:12 -0700 (PDT) Received: by mail-ot1-x332.google.com with SMTP id r26-20020a056830121ab02902a5ff1c9b81so26251375otp.11 for ; Mon, 24 May 2021 12:19:12 -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=AsmfRYALyOOPiklFnGLxIxG22/ZrSMjEGdTaIKdv2bU=; b=Z6K9qOtHmxNbIvyG9A4ac/vZr8tgn/cWTSgKRQvY4akWmBp6biiPaGssozi+HjDJ6N J2iwMafMFTIkGAGFdavLMTAX576r/cJrnUVzQoc5vnJOl4iJDionu1Toua7Pyr+Ggbdt 05WC5Vk9GH6M/SjqEXJINc5HHx2d/+YYaawdA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc; bh=AsmfRYALyOOPiklFnGLxIxG22/ZrSMjEGdTaIKdv2bU=; b=rXF7XtIFDaPYSAINmWKiKyB+8TwfCdaHeK9ZVxAoQNPQS7lQ0xZGCk7YJRV3Yr00Fv vIBuOo3Nl70GorwwDM+uxdihqPQsYSPatPRl5HcYdQAH1urEYq5/8vzCe2yEvq/S4VBp KbV5wLoBAocO8sJdZD/U8hAPdcpdO7m6PUNI/pAUXntiq3iCKrEYDUE2oshEulyNseMP ByK9JAB6yp0FHc5I15bkuL6V1Z5r/ZUF255AucFHE11Ze336aMERmmygYX1GMr7zNoiR JV97tDQI+LYm8O+GPDFoIy2aZzTEBic2+hbkseNgiVDgZUZbAaYc1K0ZlglqS22+jT6J AMvA== X-Gm-Message-State: AOAM533V88y0S9IgIPe8WFemWMR74Pf/x23pu3/QgTA3NTkwmfHK9U+r yqU88ec6MISmvCOElI7ziffrehl7KPFp509ySyZrzA== X-Received: by 2002:a05:6830:3154:: with SMTP id c20mr2433314ots.233.1621883951712; Mon, 24 May 2021 12:19:11 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 24 May 2021 19:19:11 +0000 MIME-Version: 1.0 In-Reply-To: <1133b2c21eb8f385c16c610638a17d9c@codeaurora.org> References: <20210507212505.1224111-1-swboyd@chromium.org> <20210507212505.1224111-4-swboyd@chromium.org> <1133b2c21eb8f385c16c610638a17d9c@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Mon, 24 May 2021 19:19:11 +0000 Message-ID: Subject: Re: [PATCH 3/3] drm/msm/dp: Handle aux timeouts, nacks, defers To: khsieh@codeaurora.org Cc: Rob Clark , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Dmitry Baryshkov , Abhinav Kumar , aravindh@codeaurora.org, Sean Paul Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting khsieh@codeaurora.org (2021-05-24 09:33:49) > On 2021-05-07 14:25, Stephen Boyd wrote: > > @@ -367,36 +347,38 @@ static ssize_t dp_aux_transfer(struct drm_dp_aux > > *dp_aux, > > } > > > > ret = dp_aux_cmd_fifo_tx(aux, msg); > > - > > if (ret < 0) { > > if (aux->native) { > > aux->retry_cnt++; > > if (!(aux->retry_cnt % MAX_AUX_RETRIES)) > > dp_catalog_aux_update_cfg(aux->catalog); > > } > > - usleep_range(400, 500); /* at least 400us to next try */ > > - goto unlock_exit; > > - } > > 1) dp_catalog_aux_update_cfg(aux->catalog) will not work without > dp_catalog_aux_reset(aux->catalog); > dp_catalog_aux_reset(aux->catalog) will reset hpd control block and > potentially cause pending hpd interrupts got lost. > Therefore I think we should not do > dp_catalog_aux_update_cfg(aux->catalog) for now. > reset aux controller will reset hpd control block probolem will be fixed > at next chipset. > after that we can add dp_catalog_aux_update_cfg(aux->catalog) followed > by dp_catalog_aux_reset(aux->catalog) back at next chipset. Hmm ok. So the phy calibration logic that tweaks the tuning values is never used? Why can't the phy be tuned while it is active? I don't understand why we would ever want to reset the aux phy when changing the settings for a retry. Either way, this is not actually changing in this patch so it would be another patch to remove this code. > > 2) according to DP specification, aux read/write failed have to wait at > least 400us before next try can start. > Otherwise, DP compliant test will failed Yes. The caller of this function, drm_dp_dpcd_access(), has the delay already if (ret != 0 && ret != -ETIMEDOUT) { usleep_range(AUX_RETRY_INTERVAL, AUX_RETRY_INTERVAL + 100); } so this delay here is redundant.