linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: andersson@kernel.org, viresh.kumar@linaro.org,
	Sudeep Holla <sudeep.holla@arm.com>,
	krzysztof.kozlowski+dt@linaro.org, rafael@kernel.org,
	robh+dt@kernel.org, johan@kernel.org, devicetree@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v7 0/4] qcom-cpufreq-hw: Add CPU clock provider support
Date: Thu, 17 Nov 2022 13:23:19 +0000	[thread overview]
Message-ID: <20221117132319.cx7cwt3dwywlt6wx@bogus> (raw)
In-Reply-To: <20221117123841.GI93179@thinkpad>

On Thu, Nov 17, 2022 at 06:08:41PM +0530, Manivannan Sadhasivam wrote:

[...]
>
> AFAIK, OPP framework needs to know the current frequency of the device it is
> dealing with for setting the device's OPP. So it uses clk_get_rate() of the
> first clock of the device. If the clock is not available, then it uses the
> frequency in the first entry of the OPP table (since it is going to be the
> minimum freq of the device).
>

It has been a while since I followed OPP. Thanks for all the info, helped me
get updated without looking at the code in detail.

> As you can see, the clk_get_rate() is eminent for switching the OPPs and since
> OPP framework doesn't know what device it is dealing with, it cannot use
> cpufreq_get().
>

Agreed. I had assumed the qcom-cpufreq-hw as setting cpufreq directly pocking
the hardware but now I see it is using opp library to set some additional
policy.

> Is SCMI node itself has the OPP tables? Or the consumer nodes of the SCMI?
>

No, OPPs are read from the f/w and we just use OPP APIs to register them.
But we don't use OPP library to set the performance.

> TLDR; If you tell OPP framework to set a new OPP for a device, it needs to the
> know the current frequency of the device. And it is not manadatory now, but in
> the future maybe.
>

Hmm, good to know. I prefer it is not coupled with clocks and have some
alternative mechanism that is suitable for performance domains and don't
enforce the use of clock bindings and clk framework unnecessarily.

--
Regards,
Sudeep`

  reply	other threads:[~2022-11-17 13:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  5:31 [PATCH v7 0/4] qcom-cpufreq-hw: Add CPU clock provider support Manivannan Sadhasivam
2022-11-17  5:31 ` [PATCH v7 1/4] dt-bindings: cpufreq: cpufreq-qcom-hw: Add cpufreq clock provider Manivannan Sadhasivam
2022-11-17  5:31 ` [PATCH v7 2/4] arm64: dts: qcom: sm8450: Supply clock from cpufreq node to CPUs Manivannan Sadhasivam
2022-11-17  5:31 ` [PATCH v7 3/4] cpufreq: qcom-hw: Add CPU clock provider support Manivannan Sadhasivam
2022-11-17  5:31 ` [PATCH v7 4/4] cpufreq: qcom-hw: Fix the frequency returned by cpufreq_driver->get() Manivannan Sadhasivam
2022-11-21  5:04   ` Viresh Kumar
2022-11-17 10:19 ` [PATCH v7 0/4] qcom-cpufreq-hw: Add CPU clock provider support Sudeep Holla
2022-11-17 11:12   ` Manivannan Sadhasivam
2022-11-17 11:52     ` Sudeep Holla
2022-11-17 11:58       ` Manivannan Sadhasivam
2022-11-17 12:08         ` Sudeep Holla
2022-11-17 12:38           ` Manivannan Sadhasivam
2022-11-17 13:23             ` Sudeep Holla [this message]
2022-11-17 11:24   ` Viresh Kumar
2022-11-17 12:01     ` Sudeep Holla
2022-11-18  5:57       ` Viresh Kumar
2022-11-18 11:54         ` Sudeep Holla
2022-11-21  5:19 ` Viresh Kumar
2022-11-21  6:45   ` Manivannan Sadhasivam
2022-11-21  7:48   ` Viresh Kumar
2022-12-06 18:19 ` (subset) " Bjorn Andersson

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=20221117132319.cx7cwt3dwywlt6wx@bogus \
    --to=sudeep.holla@arm.com \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=johan@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@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=robh+dt@kernel.org \
    --cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).