Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8630176rwl; Tue, 10 Jan 2023 16:47:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXuwwtdkm1oJyv+fbxy0AIBESF8lZlbDsCarZK8tey8oGDWUpVW31/azVbFKgNFxkyMqAbsu X-Received: by 2002:a17:902:a717:b0:188:640f:f41e with SMTP id w23-20020a170902a71700b00188640ff41emr71380254plq.4.1673398022472; Tue, 10 Jan 2023 16:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673398022; cv=none; d=google.com; s=arc-20160816; b=098cf9KiyykBdbIRfXbh32hA73cDdIbPpXDM28Zcze1HK1o4MuX4LIdBz080yMMSN0 Dzx6UoeJVYkl2DZUFgff0S9ymEcF8qVOxGMsub8WAnx7aPGFLC3KC2cr5R79qpe/4Gbf PnHYH9hG9jiCbkfyvxrRisPeiXKv2fY9Prm4WIvtNCt/PvQjrcYZj8njztf774dGUxux +v0jQSjI6DQTjd0nHDMNozv3CctG9XBf4bEpoCY/JpEeK5UEOlbjrNxsujt2ALzAuLQ6 /KzbPxGPgNcUAgFIXuRb4kX9Wth48oakq7CAFcNrepFOlvwQv5dlaARwuaIlV1SaJmOw uOxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fxOjkVkboXRnISG7GaZo9vjhTrmTTUvqEXeMahatA7M=; b=yxAXUku0rzbO34gx6QQ90FOSHp4bk5ygRKZymf2PNzU18thOcPlB7+oVp6gbFWwWJ9 4QkPPc/KNRv5ohb8xHIh9WF4lfCy59Vbi2AMXvtn/rYaelb5G02EqJcovbQfkDxSYhn8 Sx0zVLE8NGRTTudMVPhpiVETorMZLGWE+bEDCARC2NN/hn+oY7vWr1wVg2zNnwIrj4W8 9stFLnr7/Dx4gTlUJzJpp8z5iKjZO7nftvROuVe12HF5UTF8S/4OgBbe8fGcVeTy7xyb EKhds2oVwGW5v4dQNLsDPdVOmxecYBwx2pr9EJU73LRWSgMrnt98Oo/ZDpc8qm13hQ4u kDCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WjR2YnPJ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170903018500b00189d0fa14d6si14219311plg.13.2023.01.10.16.46.55; Tue, 10 Jan 2023 16:47:02 -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=WjR2YnPJ; 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 S232195AbjAJXhF (ORCPT + 53 others); Tue, 10 Jan 2023 18:37:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbjAJXhA (ORCPT ); Tue, 10 Jan 2023 18:37:00 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED6CE58332 for ; Tue, 10 Jan 2023 15:36:58 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id j7so8372358wrn.9 for ; Tue, 10 Jan 2023 15:36:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fxOjkVkboXRnISG7GaZo9vjhTrmTTUvqEXeMahatA7M=; b=WjR2YnPJqFFObwyC0JtfVB5IfTk7/pOBxZoJx3koapx+PjfwufQCb/S8O89Ts8nHej Z4jpnzoSjcV5USy/jnGO9utG98Hpc4tieOC+9LfAgzr4MtWXUUSrCOEQVG0jCCiChnn+ C9b9i8nVxRzHe76M9+HaZLOOUfmrqJido/mTt8roLyMIk0r+MQCSyQ3DkgwlEKPKFXPu Gp/66WAU1048EX7Q7TE/S/yTScJxMnNJg8rxSKNS1yXBg6xtTWrRytzZmdji3NHww8Nu jA6uf31OGyfHb+k9oKakjOu7eaSAsvVZWX/+euRLQn7g5iJVIuw3VcZyH5HTLbwf4UHX sTcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fxOjkVkboXRnISG7GaZo9vjhTrmTTUvqEXeMahatA7M=; b=cJ6DjlTDmaIGVfRhfm7hpjzGq1a90+rG1Gf84erPHleOtLbgdmjK96ZUA+nGoN8PWh P4dwnh+xzrki0iJlPnpxSnmiL2+F8ynS1W6Zu5wUIfpDb4Jkqy7KCV2Mylx0DW+dYRH8 rxaGxUapeJfNYjeVG8r6gPRPLbDign3JsddcUbcCwqG2O89FWebV9RZArQdeg5yoOclI DA5eXJFJr6YdpUb+G3HPa1u42R+j/FDGWc5gxuLIpZOOvPiXCsCnp2IB+PYZj5hAOUzh 8jTNd1D/rSRUamGxVG5SS4ZNBigP5N4/66/3Eg4QVOG21BzaGNAa++5aZAKXn+lsUXtQ UwXA== X-Gm-Message-State: AFqh2kpKu1fVaJLaMrDp42fFBpZfFtDDXhQmEaGNBFmqoMe5yEtbhqDT jnmp/fyFu35Up6EAh5vSCiiReg== X-Received: by 2002:adf:a4de:0:b0:2a9:89e:2b53 with SMTP id h30-20020adfa4de000000b002a9089e2b53mr15529548wrb.45.1673393817487; Tue, 10 Jan 2023 15:36:57 -0800 (PST) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id t14-20020adfeb8e000000b002baa780f0fasm12191553wrn.111.2023.01.10.15.36.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jan 2023 15:36:56 -0800 (PST) Message-ID: <49f02945-0f37-b046-dae7-417ab0148bff@linaro.org> Date: Tue, 10 Jan 2023 23:36:56 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 03/10] interconnect: qcom: rpm: Always set QoS params on QNoC Content-Language: en-US To: Konrad Dybcio , linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Georgi Djakov , AngeloGioacchino Del Regno , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230110132202.956619-1-konrad.dybcio@linaro.org> <20230110132202.956619-4-konrad.dybcio@linaro.org> From: Bryan O'Donoghue In-Reply-To: <20230110132202.956619-4-konrad.dybcio@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2023 13:21, Konrad Dybcio wrote: > On newer SoCs, 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 don't > vote through RPM, QoS parameters should be set regardless, as we're > requesting additional bandwidth by setting the interconnect clock > rates. > > With NoC (the old-SoC bus type), this is not the case and they are > mutually exclusive (so, the current upstream logic is correct). > > For BIMC however, newer SoCs expect QoS params to be always set > (like QNoC) whereas older ones (like MSM8998) hang up completely when > doing so, hence this will be addressed in the next commit. > > 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 > --- > drivers/interconnect/qcom/icc-rpm.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c > index cd1eab3d93ba..0516b74abdc7 100644 > --- a/drivers/interconnect/qcom/icc-rpm.c > +++ b/drivers/interconnect/qcom/icc-rpm.c > @@ -246,15 +246,27 @@ static int qcom_icc_rpm_set(int mas_rpm_id, int slv_rpm_id, u64 sum_bw) > static int __qcom_icc_set(struct icc_node *n, struct qcom_icc_node *qn, > u64 sum_bw) > { > + struct qcom_icc_provider *qp = to_qcom_provider(n->provider); > + bool vote_ap, vote_rpm; > int ret; > > - if (!qn->qos.ap_owned) { > - /* send bandwidth request message to the RPM processor */ > + if (qp->type == QCOM_ICC_QNOC) { > + vote_ap = true; > + vote_rpm = true; > + } else { > + vote_ap = qn->qos.ap_owned; > + vote_rpm = !vote_ap; > + } > + > + if (vote_rpm) { > + /* 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) { > - /* set bandwidth directly from the AP */ > + } > + > + if (vote_ap && 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; Reviewed-by: Bryan O'Donoghue