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 20449C47258 for ; Wed, 31 Jan 2024 11:25:30 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Tk25ww29hDKQ2O4hWk05dGEy4IfsHHsTvzaMi0epUs=; b=cUFmQRPGyuYiyZ rgFxbwYdZCdIel995m1l1sSOtzU0bRo5jq3lJgRAITKvvrhRx0XT5tVC6BgFighQkuKRk1UnVs3Zn kzWwNtRlNWdxixvsOkFn2HbqSVEd/mNIMuJnld/IbMd2oGuRGcCOwp7ziTG4AIYHxRRZBVWyH/vX9 ULj0mpvWXy068GP1Z5/EIa4pZyjGaR1zNCrPRw1ebpsWdoDF/YjNAWSdT9dl8uOUYgyZFHi3r03qj fin1FASxYJ+K5HI9RIMrJFNxD32+rtbU4i6yoveyiXmW04tLCedjHvCIp81Rg2eH1yjUFSeHTYpXZ HOzpHdT71s5v5rh+10sA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV8iU-00000003562-3pcP; Wed, 31 Jan 2024 11:25:18 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rV8iS-0000000355F-2Uy6 for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 11:25:17 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 42C65DA7; Wed, 31 Jan 2024 03:25:56 -0800 (PST) Received: from bogus (unknown [10.57.78.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 123C53F762; Wed, 31 Jan 2024 03:25:09 -0800 (PST) Date: Wed, 31 Jan 2024 11:25:07 +0000 From: Sudeep Holla To: Sibi Sankar Cc: cristian.marussi@arm.com, rafael@kernel.org, viresh.kumar@linaro.org, Sudeep Holla , morten.rasmussen@arm.com, dietmar.eggemann@arm.com, lukasz.luba@arm.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mdtipton@quicinc.com, linux-arm-msm@vger.kernel.org, nm@ti.com Subject: Re: [PATCH 2/3] firmware: arm_scmi: Add support for marking certain frequencies as boost Message-ID: <20240131112507.fu355wnolbsoiqxn@bogus> References: <20240117110443.2060704-1-quic_sibis@quicinc.com> <20240117110443.2060704-3-quic_sibis@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240117110443.2060704-3-quic_sibis@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_032516_710004_59DBA123 X-CRM114-Status: GOOD ( 19.65 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 17, 2024 at 04:34:42PM +0530, Sibi Sankar wrote: > All opps above the sustained level/frequency are treated as boost, so mark > them accordingly. > > Suggested-by: Sudeep Holla > Signed-off-by: Sibi Sankar > --- > drivers/firmware/arm_scmi/perf.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > index e286f04ee6e3..d3fb8c804b3d 100644 > --- a/drivers/firmware/arm_scmi/perf.c > +++ b/drivers/firmware/arm_scmi/perf.c > @@ -811,7 +811,7 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, > struct device *dev, u32 domain) > { > int idx, ret; > - unsigned long freq; > + unsigned long freq, sustained_freq; > struct dev_pm_opp_data data = {}; > struct perf_dom_info *dom; > > @@ -819,12 +819,21 @@ static int scmi_dvfs_device_opps_add(const struct scmi_protocol_handle *ph, > if (IS_ERR(dom)) > return PTR_ERR(dom); > > + if (!dom->level_indexing_mode) > + sustained_freq = dom->sustained_perf_level * dom->mult_factor; > + else > + sustained_freq = dom->sustained_freq_khz * dom->mult_factor; > + Can't we just use dom->sustained_freq_khz * 1000UL in both the cases ? Other than that this series looks good to me but it would be good to explain how you would use this. Since it is enabled by default, do you plan to disable boost at time and when ? If it is for thermal reasons, why your other series handling thermal and limits notification from the firmware not sufficient. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel