From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-arm-msm@vger.kernel.org, andersson@kernel.org,
agross@kernel.org, krzysztof.kozlowski@linaro.org
Cc: marijn.suijten@somainline.org, Georgi Djakov <djakov@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
AngeloGioacchino Del Regno <kholk11@gmail.com>
Subject: Re: [PATCH 2/4] interconnect: qcom: rpm: Set QoS parameters regardless of RPM bw setting
Date: Tue, 3 Jan 2023 23:43:51 +0000 [thread overview]
Message-ID: <0e2bdaec-b7ba-0474-8b80-8901fcc87a0f@linaro.org> (raw)
In-Reply-To: <20230103173059.265856-2-konrad.dybcio@linaro.org>
On 03/01/2023 17:30, Konrad Dybcio wrote:
> QoS parameters and RPM bandwidth requests are wholly separate. Setting one
> should only depend on the description of the interconnect node and not
> whether the other is present. If we vote through RPM, QoS parameters
> should be set so that the bus controller can make better decisions.
Is that true ?
> If we don't vote through RPM, QoS parameters should be set regardless,
> as we're requesting additional bandwidth by setting the interconnect
> clock rates.
>
> The Fixes tag references the commit in which this logic was added, it
> has since been shuffled around to a different file, but it's the one
> where it originates from.
>
> Fixes: f80a1d414328 ("interconnect: qcom: Add SDM660 interconnect provider driver")
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> drivers/interconnect/qcom/icc-rpm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 06e0fee547ab..a190a0a839c8 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -252,8 +252,10 @@ static int __qcom_icc_set(struct icc_node *n, struct qcom_icc_node *qn,
> ret = qcom_icc_rpm_set(qn->mas_rpm_id, qn->slv_rpm_id, sum_bw);
> if (ret)
> return ret;
> - } else if (qn->qos.qos_mode != -1) {
> - /* set bandwidth directly from the AP */
> + }
> +
> + if (qn->qos.qos_mode != NOC_QOS_MODE_INVALID) {
> + /* Set QoS params from the AP */
> ret = qcom_icc_qos_set(n, sum_bw);
> if (ret)
> return ret;
Taking the example of
static struct qcom_icc_node bimc_snoc_slv = {
.name = "bimc_snoc_slv",
.id = MSM8939_BIMC_SNOC_SLV,
.buswidth = 16,
.mas_rpm_id = -1,
.slv_rpm_id = 2,
.num_links = ARRAY_SIZE(bimc_snoc_slv_links),
.links = bimc_snoc_slv_links,
};
#define NOC_QOS_MODE_INVALID -1
ap_owned == false
qos_mode == NOC_QOS_MODE_FIXED
if (!qn->qos.ap_owned) {
/* bod: this will run */
/* send bandwidth request message to the RPM processor */
ret = qcom_icc_rpm_set(qn->mas_rpm_id, qn->slv_rpm_id, sum_bw);
if (ret)
return ret;
} else if (qn->qos.qos_mode != -1) {
/* bod: this will not run */
/* set bandwidth directly from the AP */
ret = qcom_icc_qos_set(n, sum_bw);
if (ret)
return ret;
}
and your proposed change
if (!qn->qos.ap_owned) {
/* bod: this will run */
/* send bandwidth request message to the RPM processor */
ret = qcom_icc_rpm_set(qn->mas_rpm_id, qn->slv_rpm_id, sum_bw);
if (ret)
return ret;
}
if (qn->qos.qos_mode != NOC_QOS_MODE_INVALID) {
/* bod: this will run */
/* set bandwidth directly from the AP */
ret = qcom_icc_qos_set(n, sum_bw);
if (ret)
return ret;
}
however if we look downstream we have the concept of ap_owned
https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_fabric_adhoc.c#L194
https://git.codelinaro.org/clo/la/kernel/msm-3.18/-/blob/LA.BR.1.2.9-00810-8x09.0/drivers/platform/msm/msm_bus/msm_bus_fabric_adhoc.c#L208
In simple terms
if (node_info->ap_owned) {
ret = fabdev->noc_ops.set_bw(node_info,
} else {
ret = send_rpm_msg(node_device);
}
I agree your code does what it says on the tin but, whats the overall
justification to depart from the downstream logic ?
---
bod
next prev parent reply other threads:[~2023-01-03 23:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 17:30 [PATCH 1/4] interconnect: qcom: rpm: Don't set QoS params before non-zero bw is requested Konrad Dybcio
2023-01-03 17:30 ` [PATCH 2/4] interconnect: qcom: rpm: Set QoS parameters regardless of RPM bw setting Konrad Dybcio
2023-01-03 23:43 ` Bryan O'Donoghue [this message]
2023-01-03 23:48 ` Bryan O'Donoghue
2023-01-04 0:39 ` Konrad Dybcio
2023-01-04 1:10 ` Bryan O'Donoghue
2023-01-04 0:48 ` Konrad Dybcio
2023-01-03 17:30 ` [PATCH 3/4] interconnect: qcom: rpm: make QoS INVALID default, separate out driver data Konrad Dybcio
2023-01-03 17:30 ` [PATCH 4/4] interconnect: qcom: rpm: Add support for specifying channel num Konrad Dybcio
2023-01-03 23:07 ` [PATCH 1/4] interconnect: qcom: rpm: Don't set QoS params before non-zero bw is requested Bryan O'Donoghue
2023-01-04 0:25 ` Konrad Dybcio
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=0e2bdaec-b7ba-0474-8b80-8901fcc87a0f@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=kholk11@gmail.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marijn.suijten@somainline.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