From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: neil.armstrong@linaro.org, Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Georgi Djakov <djakov@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Mike Tipton <mdtipton@codeaurora.org>
Subject: Re: [PATCH v2 1/4] interconnect: qcom: Add support for mask-based BCMs
Date: Fri, 23 Jun 2023 15:45:41 +0200 [thread overview]
Message-ID: <e1e82967-f2d5-48f9-80ba-2dafbac554c9@linaro.org> (raw)
In-Reply-To: <20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-1-709474b151cc@linaro.org>
On 23.06.2023 14:50, neil.armstrong@linaro.org wrote:
> From: Mike Tipton <mdtipton@codeaurora.org>
>
> Some BCMs aren't directly associated with the data path (i.e. ACV) and
> therefore don't communicate using BW. Instead, they are simply
> enabled/disabled with a simple bit mask. Add support for these.
>
> Origin commit retrieved from:
> https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/commit/2d1573e0206998151b342e6b52a4c0f7234d7e36
>
> Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
> [narmstrong: removed copyright change from original commit]
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> drivers/interconnect/qcom/bcm-voter.c | 5 +++++
> drivers/interconnect/qcom/icc-rpmh.h | 2 ++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
> index 8f385f9c2dd3..d5f2a6b5376b 100644
> --- a/drivers/interconnect/qcom/bcm-voter.c
> +++ b/drivers/interconnect/qcom/bcm-voter.c
> @@ -83,6 +83,11 @@ static void bcm_aggregate(struct qcom_icc_bcm *bcm)
>
> temp = agg_peak[bucket] * bcm->vote_scale;
> bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit);
> +
> + if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) {
> + bcm->vote_x[bucket] = 0;
> + bcm->vote_y[bucket] = bcm->enable_mask;
> + }
> }
>
> if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 &&
> diff --git a/drivers/interconnect/qcom/icc-rpmh.h b/drivers/interconnect/qcom/icc-rpmh.h
> index 04391c1ba465..7843d8864d6b 100644
> --- a/drivers/interconnect/qcom/icc-rpmh.h
> +++ b/drivers/interconnect/qcom/icc-rpmh.h
> @@ -81,6 +81,7 @@ struct qcom_icc_node {
> * @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm
> * @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm
> * @vote_scale: scaling factor for vote_x and vote_y
> + * @enable_mask: optional mask to send as vote instead of vote_x/vote_y
> * @dirty: flag used to indicate whether the bcm needs to be committed
> * @keepalive: flag used to indicate whether a keepalive is required
> * @aux_data: auxiliary data used when calculating threshold values and
> @@ -97,6 +98,7 @@ struct qcom_icc_bcm {
> u64 vote_x[QCOM_ICC_NUM_BUCKETS];
> u64 vote_y[QCOM_ICC_NUM_BUCKETS];
> u64 vote_scale;
> + u32 enable_mask;
> bool dirty;
> bool keepalive;
> struct bcm_db aux_data;
>
next prev parent reply other threads:[~2023-06-23 13:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 12:50 [PATCH v2 0/4] interconnect: qcom: rpmh: sm8550: mask to send as vote neil.armstrong
2023-06-23 12:50 ` [PATCH v2 1/4] interconnect: qcom: Add support for mask-based BCMs neil.armstrong
2023-06-23 13:45 ` Konrad Dybcio [this message]
2023-06-23 12:50 ` [PATCH v2 2/4] interconnect: qcom: sm8450: add enable_mask for bcm nodes Neil Armstrong
2023-06-23 13:46 ` Konrad Dybcio
2023-06-23 12:50 ` [PATCH v2 3/4] interconnect: qcom: sm8550: " Neil Armstrong
2023-06-23 12:50 ` [PATCH v2 4/4] interconnect: qcom: sa8775p: " Neil Armstrong
2023-06-23 13:47 ` Konrad Dybcio
2023-06-23 13:58 ` [PATCH v2 0/4] interconnect: qcom: rpmh: sm8550: mask to send as vote Konrad Dybcio
2023-06-23 18:58 ` Bjorn Andersson
2023-06-23 20:07 ` Mike Tipton
2023-08-09 19:23 ` Konrad Dybcio
2023-08-09 20:24 ` Georgi Djakov
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=e1e82967-f2d5-48f9-80ba-2dafbac554c9@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mdtipton@codeaurora.org \
--cc=neil.armstrong@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).