From: Georgi Djakov <djakov@kernel.org>
To: Leo Yan <leo.yan@linaro.org>, Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 4/5] interconnect: qcom: icc-rpm: Support multiple buckets
Date: Thu, 7 Jul 2022 17:29:16 +0300 [thread overview]
Message-ID: <1d0fec7d-ed83-e1ff-92a1-e721bcc50298@kernel.org> (raw)
In-Reply-To: <20220705072336.742703-5-leo.yan@linaro.org>
On 5.07.22 10:23, Leo Yan wrote:
> The current interconnect rpm driver uses a single aggregate bandwidth to
> calculate the clock rates for both active and sleep clocks; therefore,
> it has no chance to separate bandwidth requests for these two kinds of
> clocks.
>
> This patch studies the implementation from interconnect rpmh driver to
> support multiple buckets. The rpmh driver provides three buckets for
> AMC, WAKE, and SLEEP; this driver only needs to use WAKE and SLEEP
> buckets, but we keep the same way with rpmh driver, this can allow us to
> reuse the DT binding and avoid to define duplicated data structures.
>
> This patch introduces two callbacks: qcom_icc_pre_bw_aggregate() is used
> to clean up bucket values before aggregate bandwidth requests, and
> qcom_icc_bw_aggregate() is to aggregate bandwidth for buckets.
>
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
> drivers/interconnect/qcom/icc-rpm.c | 51 ++++++++++++++++++++++++++++-
> drivers/interconnect/qcom/icc-rpm.h | 6 ++++
> 2 files changed, 56 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 8c9d5cc7276c..b025fc6b97c9 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -254,6 +254,54 @@ static int __qcom_icc_set(struct icc_node *n, struct qcom_icc_node *qn,
> return 0;
> }
>
> +/**
> + * qcom_icc_rpm_pre_bw_aggregate - cleans up values before re-aggregate requests
This does not match with the name of the function below.
> + * @node: icc node to operate on
> + */
> +static void qcom_icc_pre_bw_aggregate(struct icc_node *node)
> +{
> + struct qcom_icc_node *qn;
> + size_t i;
> +
> + qn = node->data;
> + for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
> + qn->sum_avg[i] = 0;
> + qn->max_peak[i] = 0;
> + }
> +}
> +
[..]
Thanks,
Georgi
next prev parent reply other threads:[~2022-07-07 14:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 7:23 [PATCH v4 0/5] interconnect: qcom: icc-rpm: Support bucket Leo Yan
2022-07-05 7:23 ` [PATCH v4 1/5] dt-bindings: interconnect: Update property for icc-rpm path tag Leo Yan
2022-07-05 9:49 ` Krzysztof Kozlowski
2022-07-05 7:23 ` [PATCH v4 2/5] interconnect: qcom: Move qcom_icc_xlate_extended() to a common file Leo Yan
2022-07-05 7:23 ` [PATCH v4 3/5] interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended() Leo Yan
2022-07-05 7:23 ` [PATCH v4 4/5] interconnect: qcom: icc-rpm: Support multiple buckets Leo Yan
2022-07-07 14:29 ` Georgi Djakov [this message]
2022-07-08 6:29 ` Leo Yan
2022-07-05 7:23 ` [PATCH v4 5/5] interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values Leo Yan
2022-07-07 14:33 ` Georgi Djakov
2022-07-08 6:33 ` Leo Yan
2022-07-05 14:03 ` [PATCH v4 0/5] interconnect: qcom: icc-rpm: Support bucket Georgi Djakov
2022-07-07 2:52 ` Leo Yan
2022-07-07 9:56 ` Leo Yan
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=1d0fec7d-ed83-e1ff-92a1-e721bcc50298@kernel.org \
--to=djakov@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh+dt@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).