From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>, Niklas Cassel <nks@flawful.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Robert Marko <robimarko@gmail.com>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-pm@vger.kernel.org,
Jeffrey Hugo <quic_jhugo@quicinc.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>
Subject: Re: [PATCH v14 8/9] soc: qcom: Add support for Core Power Reduction v3, v4 and Hardened
Date: Wed, 19 Jun 2024 22:07:07 +0200 [thread overview]
Message-ID: <f40a24da-d201-4d57-b472-6c98c0e2deaa@linaro.org> (raw)
In-Reply-To: <CAPDyKFrNprXpdQBEzezyOJg6NJ8LLarZQV_mnQn5QyCrNmsRUw@mail.gmail.com>
On 9/6/23 12:23, Ulf Hansson wrote:
> On Mon, 28 Aug 2023 at 13:42, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> From: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>>
>> This commit introduces a new driver, based on the one for cpr v1,
>> to enable support for the newer Qualcomm Core Power Reduction
>> hardware, known downstream as CPR3, CPR4 and CPRh, and support
>> for MSM8998 and SDM630 CPU power reduction.
>>
>> In these new versions of the hardware, support for various new
>> features was introduced, including voltage reduction for the GPU,
>> security hardening and a new way of controlling CPU DVFS,
>> consisting in internal communication between microcontrollers,
>> specifically the CPR-Hardened and the Operating State Manager.
>>
>> The CPR v3, v4 and CPRh are present in a broad range of SoCs,
>> from the mid-range to the high end ones including, but not limited
>> to, MSM8953/8996/8998, SDM630/636/660/845.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
>> [Konrad: rebase, apply review comments]
>> Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
[...]
>> +
>> +static void cpr_pd_detach_dev(struct generic_pm_domain *domain,
>> + struct device *dev)
>> +{
>> + struct cpr_thread *thread = container_of(domain, struct cpr_thread, pd);
>> + struct cpr_drv *drv = thread->drv;
>> +
>> + mutex_lock(&drv->lock);
>> +
>> + dev_dbg(drv->dev, "detach callback for: %s\n", dev_name(dev));
>> + thread->attached_cpu_dev = NULL;
>> +
>> + mutex_unlock(&drv->lock);
>
> Don't you need to do some additional cleanup here? Like calling
> dev_pm_opp_of_remove_table() for example?
>
Ouch, right..
[...]
>> +
>> + /* CPR-Hardened performance states are managed in firmware */
>> + if (desc->cpr_type == CTRL_TYPE_CPRH)
>> + thread->pd.set_performance_state = cprh_dummy_set_performance_state;
>
> The dummy function above always returns 0, without actually doing
> anything. I am trying to understand the purpose of this.
>
> Would you mind elaborating on this a bit?
It looks like this was put in place to overcome the
.. && genpd->set_performance_state)
check in of_genpd_add_provider_onecell() that gatekeeps calling
functions that parse OPP tables from DT
[...]
> Note that, this was mostly a drive-by-review, looking at the genpd
> provider specific parts. In general this looks good to me, other than
> the minor comments I had above.
No worries, every time I open this file, I end up fixing more and
more things..
Konrad
next prev parent reply other threads:[~2024-06-19 20:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 11:42 [PATCH v14 0/9] Add support for Core Power Reduction v3, v4 and Hardened Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 1/9] MAINTAINERS: Add entry for Qualcomm CPRv3/v4/Hardened driver Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 2/9] dt-bindings: opp: v2-qcom-level: Document CPR3 open/closed loop volt adjustment Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 3/9] dt-bindings: soc: qcom: cpr3: Add bindings for CPR3 driver Konrad Dybcio
2023-08-29 11:01 ` Ulf Hansson
2023-08-31 16:28 ` Rob Herring
2023-08-31 16:40 ` Konrad Dybcio
2023-08-31 22:02 ` Ulf Hansson
2023-09-09 12:00 ` Konrad Dybcio
2023-08-31 21:47 ` Ulf Hansson
2023-08-28 11:42 ` [PATCH v14 4/9] soc: qcom: cpr: Move common functions to new file Konrad Dybcio
2023-08-29 15:15 ` Bjorn Andersson
2023-09-09 11:59 ` Konrad Dybcio
2024-06-18 23:33 ` Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 5/9] soc: qcom: cpr-common: Add support for flat fuse adjustment Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 6/9] soc: qcom: cpr: Use u64 for frequency Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 7/9] soc: qcom: cpr-common: Add threads support Konrad Dybcio
2023-08-28 11:42 ` [PATCH v14 8/9] soc: qcom: Add support for Core Power Reduction v3, v4 and Hardened Konrad Dybcio
2023-09-06 10:23 ` Ulf Hansson
2024-06-19 20:07 ` Konrad Dybcio [this message]
2023-08-28 11:42 ` [PATCH v14 9/9] arm64: dts: qcom: msm8998: Configure CPRh Konrad Dybcio
2024-06-12 7:53 ` [PATCH v14 0/9] Add support for Core Power Reduction v3, v4 and Hardened Varadarajan Narayanan
2024-06-18 23:58 ` Konrad Dybcio
2024-06-19 7:09 ` Varadarajan Narayanan
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=f40a24da-d201-4d57-b472-6c98c0e2deaa@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=angelogioacchino.delregno@somainline.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=nks@flawful.org \
--cc=nm@ti.com \
--cc=quic_jhugo@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=robimarko@gmail.com \
--cc=sboyd@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@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;
as well as URLs for NNTP newsgroup(s).