From: Neil Armstrong <neil.armstrong@linaro.org>
To: Maulik Shah <maulik.shah@oss.qualcomm.com>,
Georgi Djakov <djakov@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] interconnect: qcom: implement get_bw with rpmh_read
Date: Wed, 9 Sep 2026 09:16:28 +0200 [thread overview]
Message-ID: <987c56f5-7828-44b7-ae6b-eb79b15b64ab@linaro.org> (raw)
In-Reply-To: <9303e64b-00e2-4b8a-b92f-b96c0a3a5546@oss.qualcomm.com>
On 9/8/26 16:39, Maulik Shah wrote:
>
> On 08-09-2026 13:39, Neil Armstrong wrote:
>> Since we can actually read back the APPS rpmh interconnect
>> BCM votes we can actually implement the get_bw() callback
>> and provide a coherent average and peak bandwidth at probe time.
>>
>> The benefits of that are:
>> - keep disabled BCMs disabled
>> - avoid voting unused BCMs to INT_MAX
>>
>> If the interconnects are correctly described for a platform,
>> all the required BCMs would be voted to the maximum bandwidth
>> until sync_state is reached.
>>
>> Since we only get the BCM vote, we need to redistribute
>> the vote values to the associated nodes. The initial BCM
>> votes are read back at probe time in order to be ready when
>> the get_bw() is called when a node is added.
>>
>> Tested-by: Georgi Djakov <djakov@kernel.org> #db845c
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> Changes in v2:
>> - Added tested-by
>> - Rebased on v7.3-rc1 now the rpmh_read() is merged
>> - Link to v1: https://patch.msgid.link/20251106-topic-sm8x50-icc-read-rpmh-v1-1-d03a2e5ca5f7@linaro.org
>> ---
>> drivers/interconnect/qcom/bcm-voter.c | 36 +++++++++++++++++++++
>> drivers/interconnect/qcom/bcm-voter.h | 1 +
>> drivers/interconnect/qcom/icc-rpmh.c | 60 ++++++++++++++++++++++++++++++++++-
>> 3 files changed, 96 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c
>> index a2d437a05a11..9014bf20adad 100644
>> --- a/drivers/interconnect/qcom/bcm-voter.c
>> +++ b/drivers/interconnect/qcom/bcm-voter.c
>> @@ -261,6 +261,42 @@ void qcom_icc_bcm_voter_add(struct bcm_voter *voter, struct qcom_icc_bcm *bcm)
>> }
>> EXPORT_SYMBOL_GPL(qcom_icc_bcm_voter_add);
>>
>> +/**
>> + * qcom_icc_bcm_get_bw - get current bcm vote
>> + * @voter: voter used to query bcm
>> + * @bcm: bcm to get current vote from
>> + */
>> +void qcom_icc_bcm_get_bw(struct bcm_voter *voter,
>> + struct qcom_icc_bcm *bcm)
>> +{
>> + struct tcs_cmd cmd = { .addr = bcm->addr };
>> + int ret, i;
>> + u64 x, y;
>> +
>> + mutex_lock(&voter->lock);
>> +
>> + rpmh_invalidate(voter->dev);
>
> Don't see why rpmh_invalidate() is needed before a read request.
You're right, will drop.
Thanks,
Neil
>
> Thanks,
> Maulik
>
>> +
>> + ret = rpmh_read(voter->dev, &cmd);
>> + if (ret) {
>> + pr_err("Error sending AMC RPMH requests (%d)\n", ret);
>> + goto out;
>> + }
>> +
>>
next prev parent reply other threads:[~2026-09-09 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 8:09 Neil Armstrong
2026-09-08 14:39 ` Maulik Shah
2026-09-09 7:16 ` Neil Armstrong [this message]
2026-09-09 7:48 ` kernel test robot
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=987c56f5-7828-44b7-ae6b-eb79b15b64ab@linaro.org \
--to=neil.armstrong@linaro.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=maulik.shah@oss.qualcomm.com \
/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
all inboxes | Powered by JetHome®