Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2634614pxa; Mon, 17 Aug 2020 15:03:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfw8IyNX2T4skXO3uqaDEM1y6GPk3d819yzwKsGEVQWfJ3ieF6BnGmxk3LyVYoEs2rrI73 X-Received: by 2002:a17:906:fa0c:: with SMTP id lo12mr18097441ejb.390.1597701783743; Mon, 17 Aug 2020 15:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597701783; cv=none; d=google.com; s=arc-20160816; b=Z6zeOKdvC83hoGUE++BiQ3wDGYHY0pqiyK8dsCiTtynNYTbcC4n+bbLzkjFXgxOKKQ j2k/kIBiOHd512GGs8O20oRPB9s8Tg7sLibdCsxWvsxDOmX7MhfOc9F56UnQRNONBp7O FlmuIupCIVCEnzkcw06f8hvfcFt3v83M7qKExe7PNcqaPlDgMT41XtVAasfLuhWea91e wxOwHWpzrXvkAfldq4igX29y5FVcUFg4paGE3dzWjeDiMGSqFh/0zduEK+/46Caw1Yy3 gkNTn5AMX56RV3ZupEFlEAUdnRo71Dvu78Ydc+uA+kOqYXweEGtoVXF5kJOrouUOXt+W Dz0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G0z5FgDCvnOCA1VVfcUmnliHN2Wt/X2wCuX3MchrcoQ=; b=qeyCv49dL8otG1OkmTaHjIwIlGw/fm+5ZxQt4HLbgLvuYTkStPG714/4TQ1FuQKBXm iHBLURJYOaEZtfBFpcq/32RzlLfWE2CQgV472uCEdXGB/EZP1zyjbINQJYq0kMjlKnIp w3+jhU26tXwdJ1Xaf9mV0+4RgUQhDmi95E5OdeAPsp/pqhMWXKa5Fo8V5DY6mCk6kNT0 HkGyzcjtW82N3e8486JaxzrrGsE097oR/9dKsxRTu+UEXyJcfOQWmQEaggnEDuCDzZVT t5VvPWpxW3Zwkf8AOYYyV3RpIehwKne0PvOEAFDpUB8y9xZlM6nAytJsZRC6rjFMHVE9 nlRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=s4Ey9ulJ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si12139177ejt.242.2020.08.17.15.02.39; Mon, 17 Aug 2020 15:03:03 -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=@kernel.org header.s=default header.b=s4Ey9ulJ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730570AbgHQPhx (ORCPT + 99 others); Mon, 17 Aug 2020 11:37:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:57022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730294AbgHQPbu (ORCPT ); Mon, 17 Aug 2020 11:31:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9359220786; Mon, 17 Aug 2020 15:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678310; bh=37V6/cHNfByxn1dowiPj7VwusDnRpgO6TdIfMvjVYJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s4Ey9ulJNz/HtWs8iWZol+3LWuO5nUJjc2wj4d5V+c9/QZnESLQwQXAQCFTXehrUV uQvUWdD2hE/Z8CYqtsTNcxwReQwhxZP2ggroiID4NNUaojA7K3ei615j0QpioXS1RA 2I31I7ooHKTAhW/2Qdauc/JNqewEk0yCsGMe5skc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taniya Das , Evan Green , Stephen Boyd , Sasha Levin Subject: [PATCH 5.8 259/464] clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845 Date: Mon, 17 Aug 2020 17:13:32 +0200 Message-Id: <20200817143846.197184596@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143833.737102804@linuxfoundation.org> References: <20200817143833.737102804@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Taniya Das [ Upstream commit 9c3df2b1993da9ab1110702d7b2815d5cd8c02f3 ] The display gpll0 branch clock inside GCC needs to always be enabled. Otherwise the AHB clk (disp_cc_mdss_ahb_clk_src) for the display clk controller (dispcc) will stop clocking while sourcing from gpll0 when this branch inside GCC is turned off during unused clk disabling. We can never turn this branch off because the AHB clk for the display subsystem is needed to read/write any registers inside the display subsystem including clk related ones. This makes this branch a really easy way to turn off AHB access to the display subsystem and cause all sorts of mayhem. Let's just make the clk ops keep the clk enabled forever and ignore any attempts to disable this clk so that dispcc accesses keep working. Signed-off-by: Taniya Das Reported-by: Evan Green Link: https://lore.kernel.org/r/1594796050-14511-1-git-send-email-tdas@codeaurora.org Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Fixes: 06391eddb60a ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845") [sboyd@kernel.org: Fill out commit text more] Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/qcom/gcc-sc7180.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/gcc-sc7180.c b/drivers/clk/qcom/gcc-sc7180.c index ca4383e3a02a7..538677befb86f 100644 --- a/drivers/clk/qcom/gcc-sc7180.c +++ b/drivers/clk/qcom/gcc-sc7180.c @@ -1061,7 +1061,7 @@ static struct clk_branch gcc_disp_gpll0_clk_src = { .hw = &gpll0.clkr.hw, }, .num_parents = 1, - .ops = &clk_branch2_ops, + .ops = &clk_branch2_aon_ops, }, }, }; diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index f6ce888098be9..90f7febaf5288 100644 --- a/drivers/clk/qcom/gcc-sdm845.c +++ b/drivers/clk/qcom/gcc-sdm845.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved. */ #include @@ -1344,7 +1344,7 @@ static struct clk_branch gcc_disp_gpll0_clk_src = { "gpll0", }, .num_parents = 1, - .ops = &clk_branch2_ops, + .ops = &clk_branch2_aon_ops, }, }, }; -- 2.25.1