Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Imran Shaik <quic_imrashai@quicinc.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	David Dai <daidavid1@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: <linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Ajit Pandey <quic_ajipan@quicinc.com>,
	"Taniya Das" <quic_tdas@quicinc.com>,
	Jagadeesh Kona <quic_jkona@quicinc.com>,
	"Satya Priya Kakitapalli" <quic_skakitap@quicinc.com>,
	Mike Tipton <quic_mdtipton@quicinc.com>, <stable@vger.kernel.org>
Subject: Re: [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote
Date: Fri, 9 Aug 2024 10:48:53 +0530	[thread overview]
Message-ID: <0b3603b7-e09d-2754-90d1-2095efc2fbd5@quicinc.com> (raw)
In-Reply-To: <a7607f45e26c79f13b846fd0d8284bcf.sboyd@kernel.org>



On 8/9/2024 1:13 AM, Stephen Boyd wrote:
> Quoting Imran Shaik (2024-08-08 00:05:02)
>> From: Mike Tipton <quic_mdtipton@quicinc.com>
>>
>> Valid frequencies may result in BCM votes that exceed the max HW value.
>> Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
>> truncated, which can result in lower frequencies than desired.
>>
>> Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
>> Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
>> ---
>>   drivers/clk/qcom/clk-rpmh.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
>> index bb82abeed88f..233ccd365a37 100644
>> --- a/drivers/clk/qcom/clk-rpmh.c
>> +++ b/drivers/clk/qcom/clk-rpmh.c
>> @@ -263,6 +263,9 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
>>                  cmd_state = 0;
>>          }
>>   
>> +       if (cmd_state > BCM_TCS_CMD_VOTE_MASK)
>> +               cmd_state = BCM_TCS_CMD_VOTE_MASK;
>> +
> 
> This is
> 
> 	cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);

Sure, I will update this logic and post another series.

Thanks,
Imran

      reply	other threads:[~2024-08-09  5:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08  7:05 [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote Imran Shaik
2024-08-08  7:27 ` Taniya Das
2024-08-08 19:43 ` Stephen Boyd
2024-08-09  5:18   ` Imran Shaik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b3603b7-e09d-2754-90d1-2095efc2fbd5@quicinc.com \
    --to=quic_imrashai@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=daidavid1@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_ajipan@quicinc.com \
    --cc=quic_jkona@quicinc.com \
    --cc=quic_mdtipton@quicinc.com \
    --cc=quic_skakitap@quicinc.com \
    --cc=quic_tdas@quicinc.com \
    --cc=sboyd@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox