From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2315FC4338F for ; Wed, 4 Aug 2021 16:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B6CE60F41 for ; Wed, 4 Aug 2021 16:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237482AbhHDQYv (ORCPT ); Wed, 4 Aug 2021 12:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbhHDQYt (ORCPT ); Wed, 4 Aug 2021 12:24:49 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12EE6C0613D5 for ; Wed, 4 Aug 2021 09:24:36 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id 61-20020a9d0d430000b02903eabfc221a9so2170892oti.0 for ; Wed, 04 Aug 2021 09:24:36 -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=bPGAJ1O4XY4xsJwp1tio/KzVLh6cCEwMAyfzs69Wdns=; b=KOO128q3ZaIvPyPvjxovgNX30WEEa6/W/NpQhKwj13IOSiOJOIsKO/VXr6ItCk5W5O fg2gVArGO2n8ipiJ+RhV1fkJZgWm5Df72mRdKsWj9ouiDgQu6iB61BIiK6zbwPydqvTQ RkCEQ0DjUHHyamMi8cXB+PUfj1bbuC9YLQpuw= 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=bPGAJ1O4XY4xsJwp1tio/KzVLh6cCEwMAyfzs69Wdns=; b=iqCjdzZW8oxsU9c7EsDXPwV1uclfS63dK4j1FALM0a7IljQoIWatWF1Fv7MC2i/2Un 0NotOgLMalfmqEe1ACIAxFnxJXyYyhrEJ8LbJFt1WU7H9Yyt1JRDEcZzugQ3EZ81vFGw nM9FkdUwCspG6Tvm0wi/JkU09uf4AxjBPNDinRh6LuBaDOC32M1b2VC0nT1DfQJFJStj +PHd1sA0EPnkqg+iVkIOukDQhdtmRQb+qASP6UeOM8a0E+lhQ2AM6FXUcMU3r3ysMYpR qLqHfH+kHHAzLBksAWM1vDl4BHcRa2y8KS9AwH0XD8CC4CnYw9SyG40lbAZP5dGlizfi qFig== X-Gm-Message-State: AOAM531pzXlZnzGJ/pyEJMx0FBjb9gBSd6q61YGqpLcnn4ZQQCz76MZR T5C2jfPtkECDgQtNGt+EXTN1PgYlPJIJsBiMdbtWBA== X-Google-Smtp-Source: ABdhPJwESZ2fueBO9Cwh5ZfEKrgIdlZyanmaz/kvcpyGNnZR1WLw1cWI+G4ecqRzKDmX26tsafgzDe4YPwUFx/Hsyas= X-Received: by 2002:a05:6830:1490:: with SMTP id s16mr411904otq.233.1628094275464; Wed, 04 Aug 2021 09:24:35 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 4 Aug 2021 09:24:34 -0700 MIME-Version: 1.0 In-Reply-To: References: <1628007913-29892-1-git-send-email-khsieh@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Wed, 4 Aug 2021 09:24:34 -0700 Message-ID: Subject: Re: [PATCH v3] drm/msm/dp: update is_connected status base on sink count at dp_pm_resume() To: khsieh@codeaurora.org Cc: agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org, abhinavk@codeaurora.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting khsieh@codeaurora.org (2021-08-04 08:48:04) > On 2021-08-03 12:05, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2021-08-03 09:25:13) > >> @@ -1327,14 +1327,26 @@ static int dp_pm_resume(struct device *dev) > >> > >> dp_catalog_ctrl_hpd_config(dp->catalog); > >> > >> - status = dp_catalog_link_is_connected(dp->catalog); > >> + /* > >> + * set sink to normal operation mode -- D0 > >> + * before dpcd read > >> + */ > >> + dp_link_psm_config(dp->link, &dp->panel->link_info, false); > >> + > >> + /* if sink conencted, do dpcd read sink count */ > > > > s/conencted/connected/ > > > > This also just says what the code is doing. Why do we only read the > > sink > > count if the link is connected? Can we read the sink count even if the > > link isn't connected and then consider sink count as 0 if trying to > > read > > fails? > > > yes, we can do that. > But it will suffer aux time out and retry. > i think it is better to avoid this overhead by check connection first. > Hmm ok. Maybe something is wrong with the aux channel where it doesn't avoid the timeout if the connection is obviously not established yet.