From patchwork Tue Jan 3 17:30:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 38559 Return-Path: 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 + 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 ); 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 ; Tue, 3 Jan 2023 09:31:10 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id bt23so29943745lfb.5 for ; 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 To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Georgi Djakov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno 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 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: 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?= 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 --- 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;