From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
Nitin Rawat <quic_nitirawa@quicinc.com>,
Asutosh Das <quic_asutoshd@quicinc.com>
Cc: Andy Gross <agross@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Bean Huo <beanhuo@micron.com>,
Bart Van Assche <bvanassche@acm.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Taniya Das <tdas@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [RFC PATCH 4/4] ufs: set power domain performance state when scaling gears
Date: Sun, 3 Apr 2022 19:46:34 +0200 [thread overview]
Message-ID: <30aa1bdc-8b77-1077-a0a5-258ea0d27f71@linaro.org> (raw)
In-Reply-To: <YkdWvVVp4RloGjkC@ripper>
On 01/04/2022 21:47, Bjorn Andersson wrote:
> On Fri 01 Apr 07:58 PDT 2022, Krzysztof Kozlowski wrote:
>
>> Scaling gears requires not only scaling clocks, but also voltage levels,
>> e.g. via performance states.
>>
>> USe the provided OPP table, to set proper OPP frequency which through
>> required-opps will trigger performance state change.
>>
>
> This looks quite nice! Just two questions about the path looking forward.
>
> If we where to extend the opp core to allow specifying the clock rate
> for some N first clocks (similar to how e.g. regulators are handled) it
> seems possible to extend this to replace the freq-table property as
> well. Would you agree?
Yes, although that might be trickier. The frequency is a key. I'll take
a look whether it could be changed to multiple values like the voltage.
>
>
> The other missing required feature (in this area) from the upstream UFS
> driver is the ability of voting for interconnect bandwidth. Based on
> your path it would be trivial to specify different values for the votes
> for each speed, but looking at downstream [1] (each row represents the
> vote for the two paths in KB/s) indicates a more complex relationship
> between gear and voted bandwidth.
>
> This was the reason I suggested that perhaps we need to key the
> opp-table based on the gear? But I don't think there would be any issue
> detecting this in runtime...
>
> [1] https://github.com/MiCode/kernel_devicetree/blob/zeus-s-oss/qcom/waipio.dtsi#L1982
It should be doable with current bindings, assuming that gear is some
imaginary frequency. We have two interconnects for UFS (the DDR and CPU)
and OPP bindings allow to specify opp-peak-kBps and opp-avg-kBps for all
of interconnects. IOW, the opp-peak-kBps will have two values and
opp-avg-kBps as well.
What would be still missing is scaling clocks.
interconnects = <&ddr>, <&cpu>
interconnect-names = "ufs-ddr", "cpu-ufs";
opp-table {
// gear 1 or some core clock frequency?
opp-1 {
opp-hz = /bits/ 64 <75000000>, <0>, <0>, <75000000> ....;
opp-avg-kBps = <922 1000>;
opp-peak-kBps = <0 0>;
required-opps = <&rpmpd_opp_low_svs>;
}
}
arch/arm64/boot/dts/qcom/sdm630.dtsi already uses it.
I think still the problem is scaling of multiple clocks, depending on
the gear.
Best regards,
Krzysztof
prev parent reply other threads:[~2022-04-03 17:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 14:58 [RFC PATCH 0/4] ufs: set power domain performance state when scaling gears Krzysztof Kozlowski
2022-04-01 14:58 ` [RFC PATCH 1/4] dt-bindings: clock: qcom,gcc-sdm845: add parent power domain Krzysztof Kozlowski
[not found] ` <20220401232451.1B7A9C340F3@smtp.kernel.org>
2022-04-02 9:09 ` Krzysztof Kozlowski
2022-04-01 14:58 ` [RFC PATCH 2/4] dt-bindings: ufs: common: allow OPP table Krzysztof Kozlowski
2022-04-04 21:39 ` Rob Herring
2022-04-01 14:58 ` [RFC PATCH 3/4] arm64: dts: qcom: sdm845: control RPMHPD performance states with UFS Krzysztof Kozlowski
2022-04-04 0:02 ` Dmitry Baryshkov
2022-04-05 17:13 ` Bjorn Andersson
2022-04-01 14:58 ` [RFC PATCH 4/4] ufs: set power domain performance state when scaling gears Krzysztof Kozlowski
2022-04-01 19:47 ` Bjorn Andersson
2022-04-03 17:46 ` Krzysztof Kozlowski [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=30aa1bdc-8b77-1077-a0a5-258ea0d27f71@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=agross@kernel.org \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bjorn.andersson@linaro.org \
--cc=bvanassche@acm.org \
--cc=devicetree@vger.kernel.org \
--cc=jejb@linux.ibm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mturquette@baylibre.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=tdas@codeaurora.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).