From patchwork Tue Jan 3 17:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 38562 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4735780wrt; Tue, 3 Jan 2023 09:34:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtsdnjUl2U2NmdKBc2b4hf762LHNIAWJ+Z567tn/Uk5R5jd8Us4RvuIzTb8PCbLA+VeXOW+ X-Received: by 2002:a17:907:b608:b0:7c1:4623:400e with SMTP id vl8-20020a170907b60800b007c14623400emr43118392ejc.16.1672767256541; Tue, 03 Jan 2023 09:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672767256; cv=none; d=google.com; s=arc-20160816; b=Oz+tfuHF9F1JeAp0sFgbnEP2FReNjLYb33Ia0IlYZBhjczR56djvCxe0SLRVrDOWmO UZbXURL/th8Y0jIHu3mYSH+q0Tk6l6a0RZTjCr0R10MBFgHxJ038Zzhi4HfN426TI01b GNrkXgviqB5LfXEVRbIb2CcN+C7qJWRbwPCzlVd7U60O5TWxSvmoWHBt6MKNwBqO6VVo 2PvZEyqSxLUl0m7ieEv4Rs4E1tv7bp6ThinFRW01/iB3EZb7wMsm6xNPma94qOKR8/ej EazSX6s1PVzyZhnktJVuevBxfFOjlXlrVpfTlz2xtF5sF4QD28inHEZDsN0ZOma+76e9 IvZw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sO6SUqVw2xTFajMx+hD52rACWsikx2Bdie3aQKKgmBc=; b=Ojl3CTk99MDym9ZiXLLthmhjIBeaMPsGWvCj9/+MI34ieNSo/VC/uk4h5pt/Wm/iIk VMDjfl9brMmsANXDrZ6/To3laYHIdHfNNdr/3RThkCDRVKgPgH5NJFbwaIcx3+XIe48d By2IlOxjWOIdFVg+6kPhu4Mt8rlSZa5c5tpleSSrK7V+s48LeBF7xnLX4pnzKEQSMuRU 6Q+WNmLfa7ZB/hBCkzFke7bcrrgzfwFKa/zMj08jaL3e8QHtp1U/PJU1WmH0vVzHj/bb XMwaI3qFM5on5dTfVq89vi0EXWNjPxU8OJT4JDJDjeJA6OYHsJ1DIFP2LBLoh8Jykt/q tgQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sKT+ErZC; 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 dn8-20020a17090794c800b007c1b8be370bsi31038905ejc.710.2023.01.03.09.33.52; Tue, 03 Jan 2023 09:34:16 -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=sKT+ErZC; 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 S237942AbjACRbN (ORCPT + 99 others); Tue, 3 Jan 2023 12:31:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237884AbjACRbK (ORCPT ); Tue, 3 Jan 2023 12:31:10 -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 D92BF1016 for ; Tue, 3 Jan 2023 09:31:08 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id bf43so46605038lfb.6 for ; Tue, 03 Jan 2023 09:31:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sO6SUqVw2xTFajMx+hD52rACWsikx2Bdie3aQKKgmBc=; b=sKT+ErZCG/vn8T8T/vb65Fv0rvNz2/3BkseTSV4iep6x/XE5PHNAgjU624UL7ldCeV G4MggSBTBA4AXVD8rQNQGoVxaOUhmXC40r3hKoNAJ1E8Qr3lFDqUSWUBMmw2XeUJKgKD viiRbda3KxDvIPIHRBmjkflp0adm5ZUqZzxFYLLPY9oD7pZ5ywVKbozmbtuKTOwh0Cej 9iF67YNTnNc2wWdDU8bQsDt7w4+LtK1nrq4Cnoh7Qmuri7Chy+ZAYB90P/neW5wCNSLD 7xMX7mrOquJD7gMkG6j5MX/JRVhzLr2P/QDItCAw6fQLbXVWuqZCqKwTIgB96zLyCUNJ 2t5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sO6SUqVw2xTFajMx+hD52rACWsikx2Bdie3aQKKgmBc=; b=omYrZk+x8lqyrk5Q5ZtCJd02N3VIYyvBS6r8okAtbFia87fwELJrgPI07x4ET5sojr mkY/iSaGuFtHX7iQY9jItOe4fWQgFVZQRGqoJc//0ZlOAqx5kRrTUwmcUEPqeCx3vmtY IfbwyS6mCuyWDVbLRB//2Htibo5zjRgfoW2Cw2oFDvFdu+PuO95iFn0vmY/WjzAxZHLU SAkxyEOB7z6INjh8UpF+i/nPBNxkbZkIfcAU1MwbQdB9FvBOjbRiwRsrXP/8zgAlSo+L B72mdRxj4Bdy0IXJFGUa+uo0FRXTfSe8vG9axWYZW80e0ky0a5HckS2g00lywu4qg7Pv olew== X-Gm-Message-State: AFqh2kpcSQi/nFJFAiwisVDh7t/kLxNAGgb1XfliQiZ2tCngtmyTgmCn W6RS4lW3uRRbYRAJe2XyUdJIDA== X-Received: by 2002:a05:6512:b23:b0:4cb:d3:3b99 with SMTP id w35-20020a0565120b2300b004cb00d33b99mr10295016lfu.36.1672767067289; Tue, 03 Jan 2023 09:31:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 09:31:06 -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 Subject: [PATCH 1/4] interconnect: qcom: rpm: Don't set QoS params before non-zero bw is requested Date: Tue, 3 Jan 2023 18:30:56 +0100 Message-Id: <20230103173059.265856-1-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.0 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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754023598477576088?= X-GMAIL-MSGID: =?utf-8?q?1754023598477576088?= Until now, the icc-rpm driver unconditionally set QoS params, even on empty requests. This is superfluous and the downstream counterpart does not do it. Follow it by doing the same. Signed-off-by: Konrad Dybcio --- drivers/interconnect/qcom/icc-rpm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index 43b9ce0dcb6a..06e0fee547ab 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -193,6 +193,12 @@ static int qcom_icc_qos_set(struct icc_node *node, u64 sum_bw) struct qcom_icc_provider *qp = to_qcom_provider(node->provider); struct qcom_icc_node *qn = node->data; + /* Defer setting QoS until the first non-zero bandwidth request. */ + if (!(node->avg_bw || node->peak_bw)) { + dev_dbg(node->provider->dev, "NOT Setting QoS for %s\n", qn->name); + return 0; + } + dev_dbg(node->provider->dev, "Setting QoS for %s\n", qn->name); switch (qp->type) {