Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3681545pxj; Mon, 24 May 2021 12:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFSHQIIHCn5UUDDTdH7dvJj7FBDE3g0RmutHuu/JQGyUdv9bC3e9TCFh0sOgZTo2s2iDoZ X-Received: by 2002:aa7:c9ce:: with SMTP id i14mr27183329edt.148.1621883620068; Mon, 24 May 2021 12:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621883620; cv=none; d=google.com; s=arc-20160816; b=OupEcNWE96bLVijms7NvVcF92EcekgD7bQACA2psLx7UXMCSBeik8kdAdqWD9OIb0m kLQtKkDrOkv3MZoQVbFVg1+6LfvR+RT3kJBB8iZS7M8d34Gv1h+QvcfxsEbtCzGDpS/u gIZbyYopzxgJF1HBIyKfK1PrAggjqImdvrqqczpfJ0a8nUOG4wgaip+gcR4stxVxTmUg 1VUy8YG8erdzw0AvzVdPyxYrRqGEHm/SXLHtMNJvXxNgnO2K9RoIAGsNrb4BzvJVtqfB a4I8mCKkGUr5KIafAow4qXKfphxd/CRiF1RoHMNQY1RGqrAjNeGlx7bflh1Sdra4YiMy fYRg== 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=um2PPLRd0NGsUxBqyX+FbZVlwJTb66L6CWE+yk59KOs=; b=ZvutOCA/SQz/jeUVUJ70+a/Xs5uP2rb7HLZZmaaml91daiYpf8geVzA+BE//lZndh9 c5dC2OKDKNmnLItyVX5OQ9YFvxHmFiiIrtND6UoZwj3J3D/p36H7fwg4IJhdb5g7W1Mm toNlkkAkoB/pVQpfvVkmPaQlFuvGty5Z8GLqsAxkSG0C8yn0TiZWN9fdeLGQZ424IpH9 vHHiIVo6EsxpMzhyHx/2h9+waBi+sLjaKB5yKakIpPy9ZaQeu8fxtUp7KrinYM2d2XXG 1hwZYTyBzuO5o+btIguzAr5J6sPGARDwtGXbkFiHUvnq0P8ivOPIQxC857kxsMHOS3B6 a49Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cBcMduX6; 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 y17si1400347ejl.593.2021.05.24.12.13.17; Mon, 24 May 2021 12:13:40 -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=cBcMduX6; 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 S232983AbhEXTLj (ORCPT + 99 others); Mon, 24 May 2021 15:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbhEXTLi (ORCPT ); Mon, 24 May 2021 15:11:38 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8414C061574 for ; Mon, 24 May 2021 12:10:09 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id d25-20020a0568300459b02902f886f7dd43so26240508otc.6 for ; Mon, 24 May 2021 12:10:09 -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=um2PPLRd0NGsUxBqyX+FbZVlwJTb66L6CWE+yk59KOs=; b=cBcMduX6TRRUpe+jEH8fQPaayH6V8RcqkLcmDQzkr9uBEKen5OnbjnnSiW9gTtjHwV ftRP9JTMOF31WsuGFbWqOdquRsA3S2jEXQPI6T0QxM12lKAALEA2cXQ0vQs89QXrV2H1 DMSeiJnifKjcCHKbLzfrC8H+cYc0Jwz/QTMcY= 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=um2PPLRd0NGsUxBqyX+FbZVlwJTb66L6CWE+yk59KOs=; b=c+h/3SzGYcoQAcm4vXSGetW3caeCbWSNNAq8QTxXPqM6UJ3dC8X9c7Fz4gYF5g9h7k KFDvVeEmh6KYcuBHhtvEibc3DnrRkO+YV/ia6KDqm3NghF6OS31wXrhHHhzOco+SkG3J SOo+S7JFwqScCuY7zI2XxtI0JYHk0VqzKS2TSwUH7+HQuezVg5Gd3lHwRblRvzhBLR83 wtgWxueXczbGaOMfE5KwXaC4YOaZBzOJO5w0Gs077+WWgJ3ZFiJc/uv4t9TwcctdQYgA /x1YUtSF8IQa5LBKlpdRNSB6OYxp8NhWi/flytyvY7OAzE6kyTXeKYtNSqc+KRJXpUvK bMQA== X-Gm-Message-State: AOAM532JnM+H79y0LXulzaCGV9t2Q6rTlSKJ8MVN89xcMzLuTM/wY9zO nY6b29LpEQYzZwUb3eNL20NG3PcBbH7iEU4t/8dHhQ== X-Received: by 2002:a05:6830:3154:: with SMTP id c20mr2407750ots.233.1621883409262; Mon, 24 May 2021 12:10:09 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 24 May 2021 19:10:08 +0000 MIME-Version: 1.0 In-Reply-To: <1621635930-30161-1-git-send-email-khsieh@codeaurora.org> References: <1621635930-30161-1-git-send-email-khsieh@codeaurora.org> From: Stephen Boyd User-Agent: alot/0.9.1 Date: Mon, 24 May 2021 19:10:08 +0000 Message-ID: Subject: Re: [PATCH v6] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly To: Kuogee Hsieh , agross@kernel.org, bjorn.andersson@linaro.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org Cc: abhinavk@codeaurora.org, aravindh@codeaurora.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 Kuogee Hsieh (2021-05-21 15:25:30) > irq_hpd interrupt should be handled after dongle plugged in and > before dongle unplugged. Hence irq_hpd interrupt is enabled at > the end of the plugin handle and disabled at the beginning of > unplugged handle. Current irq_hpd with sink_count = 0 is wrongly > handled same as the dongle unplugged which tears down the mainlink > and disables the phy. This patch fixes this problem by only tearing > down the mainlink but keeping phy enabled at irq_hpd with > sink_count = 0 handle so that next irq_hpd with sink_count =1 can be > handled by setup mainlink only. This patch also set dongle into D3 > (power off) state at end of handling irq_hpd with sink_count = 0. > > Changes in v2: > -- add ctrl->phy_Power_count > > Changes in v3: > -- del ctrl->phy_Power_count > -- add phy_power_off to dp_ctrl_off_link_stream() > > Changes in v4: > -- return immediately if clock disable failed at dp_ctrl_off_link_stream() > > Changes in v5: > -- set dongle to D3 (power off) state at dp_ctrl_off_link_stream() > > Changes in v6: > -- add Fixes tag > > Fixes: 94e58e2d06e3 ("drm/msm/dp: reset dp controller only at boot up and pm_resume") > > Signed-off-by: Kuogee Hsieh > --- Tested-by: Stephen Boyd Reviewed-by: Stephen Boyd