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
Cc: marijn.suijten@somainline.org, Georgi Djakov <djakov@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] interconnect: qcom: icc-rpm: Don't call __qcom_icc_set twice on the same node
Date: Fri, 3 Mar 2023 11:40:53 +0000 [thread overview]
Message-ID: <2cfba291-656f-9a43-fdd5-7601a6fe6ef5@linaro.org> (raw)
In-Reply-To: <db4f4e53-e8b9-0807-7490-2c6b76194ad5@linaro.org>
On 03/03/2023 11:39, Konrad Dybcio wrote:
>
>
> On 3.03.2023 12:36, Bryan O'Donoghue wrote:
>> On 03/03/2023 11:35, Bryan O'Donoghue wrote:
>>> On 03/03/2023 11:33, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 3.03.2023 12:32, Bryan O'Donoghue wrote:
>>>>> On 03/03/2023 02:35, Konrad Dybcio wrote:
>>>>>> Currently, when sync_state calls set(n, n) all the paths for setting
>>>>>> parameters on an icc node are called twice. Avoid that.
>>>>>>
>>>>>> Fixes: 751f4d14cdb4 ("interconnect: icc-rpm: Set destination bandwidth as well as source bandwidth")
>>>>>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>>>>>> ---
>>>>>> RFC comes from the fact that I *believe* this should be correct, but I'm
>>>>>> not entirely sure about it..
>>>>>>
>>>>>>
>>>>>> drivers/interconnect/qcom/icc-rpm.c | 2 +-
>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
>>>>>> index a6e0de03f46b..d35db1af9b08 100644
>>>>>> --- a/drivers/interconnect/qcom/icc-rpm.c
>>>>>> +++ b/drivers/interconnect/qcom/icc-rpm.c
>>>>>> @@ -387,7 +387,7 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
>>>>>> ret = __qcom_icc_set(src, src_qn, sum_bw);
>>>>>> if (ret)
>>>>>> return ret;
>>>>>> - if (dst_qn) {
>>>>>> + if (dst_qn && src_qn != dst_qn) {
>>>>>> ret = __qcom_icc_set(dst, dst_qn, sum_bw);
>>>>>> if (ret)
>>>>>> return ret;
>>>>>
>>>>> Is it possible for src_qn == dst_qn ?
>>>> As the commit message says, sync_state calls set(n, n) in
>>>> drivers/interconnect/core.c : icc_sync_state(struct device *dev)
>>>
>>> So you've _seen_ that happen ?
>>>
>>
>> Assuming you have, then why isn't the fix in sync_state i.e. that's an error for everybody right ?
> I believe that there's simply no other way of updating every single node
> on its own with the icc api, without taking any links into play. But I
> see exynos and i.mx also effectively calling it twice on each node.
>
> Konrad
I mean. I'm fine for you to retain my RB on this qcom specific patch
since this seems like a real bug to me but... it seems like a generic
bug across arches that should probably be resolved @ the higher level.
?
---
bod
next prev parent reply other threads:[~2023-03-03 11:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 2:35 Konrad Dybcio
2023-03-03 11:32 ` Bryan O'Donoghue
2023-03-03 11:33 ` Konrad Dybcio
2023-03-03 11:35 ` Bryan O'Donoghue
2023-03-03 11:36 ` Konrad Dybcio
2023-03-03 11:36 ` Bryan O'Donoghue
2023-03-03 11:39 ` Konrad Dybcio
2023-03-03 11:40 ` Bryan O'Donoghue [this message]
2023-03-03 11:42 ` Konrad Dybcio
2023-03-03 11:50 ` Bryan O'Donoghue
2023-03-03 12:35 ` Konrad Dybcio
2023-03-21 19:30 ` 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=2cfba291-656f-9a43-fdd5-7601a6fe6ef5@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=djakov@kernel.org \
--cc=konrad.dybcio@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
all inboxes | Powered by JetHome®