From: Stephen Boyd <sboyd@kernel.org>
To: Manivannan Sadhasivam via B4 Relay
<devnull+manivannan.sadhasivam.linaro.org@kernel.org>,
Rafael J. Wysocki <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Xiu Jianfeng <xiujianfeng@huawei.com>,
manivannan.sadhasivam@linaro.org
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan+linaro@kernel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH 2/2] cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks
Date: Tue, 17 Dec 2024 11:46:13 -0800 [thread overview]
Message-ID: <b3fbe9aa24bce4f99e864b81ae8ec440.sboyd@kernel.org> (raw)
In-Reply-To: <20241205-qcom-cpufreq-clk-fix-v1-2-de46c82e0fe5@linaro.org>
Quoting Manivannan Sadhasivam via B4 Relay (2024-12-05 08:50:29)
> From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>
> determine_rate() callback is used by the clk_set_rate() API to get the
> closest rate of the target rate supported by the clock. If this callback
> is not implemented (nor round_rate() callback), then the API will assume
> that the clock cannot set the requested rate. And since there is no parent,
> it will return -EINVAL.
>
> This is not an issue right now as clk_set_rate() mistakenly compares the
> target rate with cached rate and bails out early. But once that is fixed
> to compare the target rate with the actual rate of the clock (returned by
> recalc_rate()), then clk_set_rate() for this clock will start to fail as
> below:
>
> cpu cpu0: _opp_config_clk_single: failed to set clock rate: -22
>
> So implement the determine_rate() callback that just returns the actual
> rate at which the clock is passed to the CPUs in a domain.
>
> Fixes: 4370232c727b ("cpufreq: qcom-hw: Add CPU clock provider support")
> Reported-by: Johan Hovold <johan+linaro@kernel.org>
> Closes: https://lore.kernel.org/all/20241202100621.29209-1-johan+linaro@kernel.org
> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
next prev parent reply other threads:[~2024-12-17 19:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-05 16:50 [PATCH 0/2] cpufreq: qcom: Clock provider fixes Manivannan Sadhasivam via B4 Relay
2024-12-05 16:50 ` [PATCH 1/2] cpufreq: qcom: Fix qcom_cpufreq_hw_recalc_rate() to query LUT if LMh IRQ is not available Manivannan Sadhasivam via B4 Relay
2024-12-05 16:50 ` [PATCH 2/2] cpufreq: qcom: Implement clk_ops::determine_rate() for qcom_cpufreq* clocks Manivannan Sadhasivam via B4 Relay
2024-12-17 19:46 ` Stephen Boyd [this message]
2024-12-20 6:40 ` [PATCH 0/2] cpufreq: qcom: Clock provider fixes Viresh Kumar
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=b3fbe9aa24bce4f99e864b81ae8ec440.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=devnull+manivannan.sadhasivam.linaro.org@kernel.org \
--cc=johan+linaro@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=xiujianfeng@huawei.com \
/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