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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31A07C433F5 for ; Sun, 8 May 2022 15:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=txEav97zAySf1a/Hlb6CWDUBLdRUDndxfoqTa3qkwnU=; b=CEFvHyO7LD90mW ADMN0vfoXCxYtUaG7+B1WN79y6E/c8bsqz5rTR4g4B5w0Xvs/GysY4fpqw6dBp7410gknj5O3ATmO C03qU37QbBB1uQAQ+9cIKJ+/1TJW0Zai9Xf1F3agWL9CSiVuVyjjUYvHMIKB85Lk79iZWUqC6vYSi PZ6EqGfaBbN2DljXnJsEYYrfGF0IGrgQ0urVuUYAnJPfbL3OWnbd1xBNhII/Vb0H6Oc2JD71Z4Afg MylxIRWJuvp5mykHQK2HjRXmz9A+BT1hVjNjvhf14nzoRk/fM0c2VYl3RGTcDJ18lcgBSIiNBntxV PBhHKE3+hSAwI+pFexcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nniVD-00ASO8-6m; Sun, 08 May 2022 15:07:19 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nniV9-00ASMp-4k; Sun, 08 May 2022 15:07:17 +0000 Received: from ip5b412258.dynamic.kabel-deutschland.de ([91.65.34.88] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nniV4-0000vT-EH; Sun, 08 May 2022 17:07:10 +0200 From: Heiko Stuebner To: Brian Norris , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Chanwoo Choi Cc: linux-kernel@vger.kernel.org, Elaine Zhang , linux-pm@vger.kernel.org, Doug Anderson , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [RFC PATCH 2/2] PM / devfreq: rk3399_dmc: Block PMU during transitions Date: Sun, 08 May 2022 17:07:09 +0200 Message-ID: <44651538.fMDQidcC6G@phil> In-Reply-To: <6c6ec0db-111c-e48f-57ce-0e444a0d168e@gmail.com> References: <20220406014842.2771799-1-briannorris@chromium.org> <582e3645-b24e-356e-7f0f-0d37bb1e32e6@gmail.com> <6c6ec0db-111c-e48f-57ce-0e444a0d168e@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220508_080716_043461_6EF34BB9 X-CRM114-Status: GOOD ( 28.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Samstag, 7. Mai 2022, 16:21:59 CEST schrieb Chanwoo Choi: > On 22. 4. 14. 08:13, Chanwoo Choi wrote: > > On 22. 4. 14. 07:45, Heiko St=FCbner wrote: > >> Hi, > >> > >> Am Donnerstag, 14. April 2022, 00:14:40 CEST schrieb Chanwoo Choi: > >>> On 22. 4. 6. 10:48, Brian Norris wrote: > >>>> See the previous patch ("soc: rockchip: power-domain: Manage resource > >>>> conflicts with firmware") for a thorough explanation of the conflict= s. > >>>> While ARM Trusted Firmware may be modifying memory controller and > >>>> power-domain states, we need to block the kernel's power-domain driv= er. > >>>> > >>>> If the power-domain driver is disabled, there is no resource conflict > >>>> and this becomes a no-op. > >>>> > >>>> Signed-off-by: Brian Norris > >>>> --- > >>>> > >>>> drivers/devfreq/rk3399_dmc.c | 13 +++++++++++++ > >>>> 1 file changed, 13 insertions(+) > >>>> > >>>> diff --git a/drivers/devfreq/rk3399_dmc.c = > >>>> b/drivers/devfreq/rk3399_dmc.c > >>>> index e494d1497d60..daff40702615 100644 > >>>> --- a/drivers/devfreq/rk3399_dmc.c > >>>> +++ b/drivers/devfreq/rk3399_dmc.c > >>>> @@ -21,6 +21,7 @@ > >>>> #include > >>>> #include > >>>> +#include > >>>> #include > >>>> #include > >>>> @@ -93,6 +94,16 @@ static int rk3399_dmcfreq_target(struct device = > >>>> *dev, unsigned long *freq, > >>>> mutex_lock(&dmcfreq->lock); > >>>> + /* > >>>> + * Ensure power-domain transitions don't interfere with ARM = > >>>> Trusted > >>>> + * Firmware power-domain idling. > >>>> + */ > >>>> + err =3D rockchip_pmu_block(); > >>>> + if (err) { > >>>> + dev_err(dev, "Failed to block PMU: %d\n", err); > >>>> + goto out_unlock; > >>>> + } > >>>> + > >>>> /* > >>>> * Some idle parameters may be based on the DDR controller = > >>>> clock, which > >>>> * is half of the DDR frequency. > >>>> @@ -198,6 +209,8 @@ static int rk3399_dmcfreq_target(struct device = > >>>> *dev, unsigned long *freq, > >>>> dmcfreq->volt =3D target_volt; > >>>> out: > >>>> + rockchip_pmu_unblock(); > >>>> +out_unlock: > >>>> mutex_unlock(&dmcfreq->lock); > >>>> return err; > >>>> } > >>> > >>> Acked-by: Chanwoo Choi > >> > >> so I guess you're ok with me picking up both patches, right? > >> [Just making sure :-) ] > > = > > This patch have the dependency of latest devfreq-next branch. > > So that need to make the immutable branch between rockchip and devfreq. > > = > = > Hi Heiko and Brian, > = > Is there any other progress? > = > IMHO, if rockchip maintainer reply the acked-by from patch1 > and then agree these patches to be applied to devfreq.git, > I can take them. sounds good to me. Patch1 looks good and correct to me, so I've added a Reviewed-by for it and it defintily makes sense for both to go through the devfreq tree then, so we don't need additional stable-branches :-) Thanks Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel