Message ID | 20230103173059.265856-2-konrad.dybcio@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4735110wrt; Tue, 3 Jan 2023 09:32:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuZyVyDh5mIjweRUg0fTNvOLsDoj7t1wf8znonsIJ5bM/NkXIT1unyowhxqit81LmLF0m5g X-Received: by 2002:aa7:c0d6:0:b0:488:6fd0:cf88 with SMTP id j22-20020aa7c0d6000000b004886fd0cf88mr20233267edp.36.1672767160718; Tue, 03 Jan 2023 09:32:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672767160; cv=none; d=google.com; s=arc-20160816; b=Owwls+sv7o2nFSZ9zkvEX2Y6kU/3tPliNS7+xIZ8e1o/ALInI7gsEzzMmXCpcFpDqr l9a9pUMzk2df/uoKjyz0F90FQRDTg3+q219PG9md5FTpfiyozkX91+6Zft3FZLBAhD6N EZPfaeJUA1vma8pKz0/GIChVupoARnZvjQ5Ot7h0CMYt80z2rXpc8ea6cV62jZ3pLRvQ QZWCv6xyz1cSQxCF6+NEjOYVIQJFTrrrt9ynUcLkxPOyWqQ6J5RnkzV9p3T7G6SPuwuG SIqDRZVTu/WusV6tYKAREvmRPBBWGvtx8t6Z037UkdsFFQOyN/32adEPlTCvOCrRsyTh r6NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g9TS4SJ+83/pLOhWHZLdZeC8hyETp6X/nWYIPMtmOR4=; b=YroCTO1DXy37nH07rnuTF2jgzmuRkWDTYXlVIgJrkM7rhcv9Re5S3MZil8Zdbyn6Xs 9qzbw0Oq7vQcuE+T3j6mIy3Bu1gbiz88cLk86s4upVs9xHuh5tMWrEHQc6ywH8BOlgwH kKB5QpX26xj5kFH2QxsxajCs7Flo0AjTixaM5lvpTtizrVfIU8U29RLxHbjGYoL+e0Ub LGFiqdkC8T3FcHkRdaEJQdqhln3VQE6/nYg9DLjp6LJRc+sfZTR/jA9eUXEIfXHjAFKT KJq+DPHY4D/vriMohrX48xFDoShO7h0BeaT5j4XXUu1Ui5S1fTM43iyv+Su11t3YzS8W ff8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IkOm6cg4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s17-20020aa7c551000000b0046775f92f19si24014213edr.50.2023.01.03.09.32.16; Tue, 03 Jan 2023 09:32:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IkOm6cg4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238097AbjACRbQ (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Tue, 3 Jan 2023 12:31:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237814AbjACRbL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Jan 2023 12:31:11 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45DD4D4B for <linux-kernel@vger.kernel.org>; Tue, 3 Jan 2023 09:31:10 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id bt23so29943745lfb.5 for <linux-kernel@vger.kernel.org>; Tue, 03 Jan 2023 09:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g9TS4SJ+83/pLOhWHZLdZeC8hyETp6X/nWYIPMtmOR4=; b=IkOm6cg4jYOgHWBc6tW60dORhiFerv+60CiD0QP/aXBp99xSxeTJHP0DPza2wff06c XDPftLeO6i+f7+0gyK8yjpHzFjfciBPgG9498Xek8cgUWHvmkU0OuaDCFGUPNdVsh1M7 quk++8SC5kADnH8sBQsWNwc5kDAX796QHWHRr8mg230oSJDQSraYuZutC+63wPPkdi/c V1a7dQ7L431jGAN8ch4PWDTB3gM39H3Fz9E9pTfMmk2f88u2KoTf0NBE7ZKykHMv6ZDh 2FGehtczs1D8bUjJnuO2fAQK6lGE5TGxnBRZiuU17k3DMZWqBR/l+Qet7xxZ5Qdai+wP ctMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g9TS4SJ+83/pLOhWHZLdZeC8hyETp6X/nWYIPMtmOR4=; b=kkdwndXgeivAmLFww8o1EbmexZU3Ey8Da9VdC8XJR15fbh4RhAjgZwwUrFJhkU0iMZ 6W2MyRx2/yVmj1SWEs4Mp8bTuec6Uz62Ds2JlBRFliBd20gTaYNBbcW51HEuv2BKedyM XeKi7Z7xleeySg40Sh54Diy7Y2rPg9QQ0XMKwtsJUetiaRwmdGJzS1bJ3x6k3ol0j9hA fsUVoCp9hXg65xkwe2rjWvSO0sr+GKgfF2JpKQx67k7P8h/lK7MYDx1EikqW4YgQobJV jpJBHS/wWMUXZ022C3ymOs8mDiMsOWmhjdYgPkAZ2B9TAK36qxq0jwEL2juZ3Ruh+rzy PhBg== X-Gm-Message-State: AFqh2kplFpSSt4P2u78AanLI7loXAsqO9i6TNuoHccfvedckbSVegzk3 +HtMZT+BmH1VhePHtIr/clZKGQ== X-Received: by 2002:ac2:498f:0:b0:4a4:86ff:9562 with SMTP id f15-20020ac2498f000000b004a486ff9562mr13562225lfl.38.1672767068622; Tue, 03 Jan 2023 09:31:08 -0800 (PST) Received: from localhost.localdomain (abxi45.neoplus.adsl.tpnet.pl. [83.9.2.45]) by smtp.gmail.com with ESMTPSA id o9-20020ac25e29000000b004b4b5da5f80sm4916818lfg.219.2023.01.03.09.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 09:31:08 -0800 (PST) From: Konrad Dybcio <konrad.dybcio@linaro.org> To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio <konrad.dybcio@linaro.org>, Georgi Djakov <djakov@kernel.org>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno <kholk11@gmail.com> Subject: [PATCH 2/4] interconnect: qcom: rpm: Set QoS parameters regardless of RPM bw setting Date: Tue, 3 Jan 2023 18:30:57 +0100 Message-Id: <20230103173059.265856-2-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230103173059.265856-1-konrad.dybcio@linaro.org> References: <20230103173059.265856-1-konrad.dybcio@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754023498223797566?= X-GMAIL-MSGID: =?utf-8?q?1754023498223797566?= |
Series |
[1/4] interconnect: qcom: rpm: Don't set QoS params before non-zero bw is requested
|
|
Commit Message
Konrad Dybcio
Jan. 3, 2023, 5:30 p.m. UTC
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.
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(-)
Comments
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
On 03/01/2023 23:43, Bryan O'Donoghue wrote: > On 03/01/2023 17:30, Konrad Dybcio wrote: > I agree your code does what it says on the tin but, whats the overall > justification to depart from the downstream logic ? > > --- > bod and can we prove with a meaningful test a behaviour change ? Better throughput ? Lower thermals ? --- bod
On 4.01.2023 00:43, Bryan O'Donoghue wrote: > 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 ? Okay, so maybe it would be worth checking with Qualcomm what it's supposed to do. On msm-5.4 setting QoS is done unconditionally, no matter if the node has valid (!= -1) rpm mas/slv IDs. https://github.com/sonyxperiadev/kernel/blob/aosp/LA.UM.9.14.r1/drivers/interconnect/qcom/icc-rpm.c#L97 It may be something that began with newer SoCs, or maybe the carried-with-us-ever-since-3.4 chonky msm_bus driver had a bug.. or maybe the msm-5.4 interconnect impl has a bug.. We really won't know unless somebody can confirm it for us.. My understanding would be such that the QoS parameters are always set from the AP and RPM just scales the bandwidth on certain nodes, like it scales power and frequency for some lines/devices. That may or may not be true or might also depend on the SoC / RPM fw.. And even if RPM sets these values internally, it shouldn't hurt to adjust them from AP again, but that would both deserve a different comment and would be a rather bad design, as tuning the values would require a rpm firmware update (and we know how vendors treat firmware updates), so that might have been something qc engineers took into account.. tldr: new soc good (*), old soc bad-or-no-effect (*), should ask QC Konrad > > --- > bod
On 4.01.2023 00:43, Bryan O'Donoghue wrote: > 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 */ Also, this will not run with the next patch, perhaps i should have ordered them differently (or perhaps the issue it solves should have never been introduced :P). Konrad > /* 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
On 04/01/2023 00:39, Konrad Dybcio wrote:
> tldr: new soc good (*), old soc bad-or-no-effect (*), should ask QC
I think this needs to be tested before application. If it is benign on <
kernel 5.4 SoCs then that's fine too but, it does need to be validated
as so.
I suspect there's no silicon dependency, it is probably "just how the
code was written" without any silicon dependency backing it up but, I
think we need to do the work to prove that before applying.
An RFT with some interconnect settings targeted for test on pre 5.4 and
post 5.4 SoCs would do.
---
bod
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;