From patchwork Fri Jun 9 20:19:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 105799 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1166577vqr; Fri, 9 Jun 2023 13:30:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5i/C1clqedVwN0NQdrV7A1GEtAUTwknCheBgJgohsZdDThw/TX+pBA6QoBx5vVHDgI9i7U X-Received: by 2002:a05:6e02:544:b0:33b:f86:d2ac with SMTP id i4-20020a056e02054400b0033b0f86d2acmr2473598ils.1.1686342617585; Fri, 09 Jun 2023 13:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686342617; cv=none; d=google.com; s=arc-20160816; b=L1+2aPHUk+i5iYG08SUW9q8lYHu1ayN6jm5DJzQptZ1mFN7sKQGscW3tw+D9qhIM3i nh56Es1U53o7WRxY01PCNTEkpwgXkfzeveYBnY3ffrfzpqUPf/xG6yXu7oHKBpbaTvz8 QMKHFYFWdw8St8+cVF7znBy8oBPQYlZif2lLdO4FryBMNJtbLw7fzEByyHkFf2j9NDql cNQ57kFGsrGRWDADFJJosqdJy90MdntwAq/eANF8IbYuKaOeju0szg3TfSWNWg74tZr6 ARspU8aGAqdIB6qkhzPf+Ey/Pki/2FO9SpcWRbguhBt1SK9omx9CBsqchnil4n7HBsFt tpug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=+CYnae38h+2Ha8DEsswsgC3tiiF77w45gY0ME9hPmK0=; b=kcq/sZIOJXBhf5VoY60tW+ZlZKqTEh53UcCJByKPFx6cfzJD0cBGV3AdGoiVEDnxrU 13tGgQoeDjgXVPIoa/5+2B8W3QlLPVLdYkc2GdnvIHvKcL5G4tc57YLlS88/9scxPWlJ +xsNDnHi9lpaeiAPzRbZj5ArfP57UaY4/HxhStTLr/P9SrirqTPGBA+a6HeT7u+99kvw A/xVf2DLRG5oghIniHl7zqanOB5Syk55SDqenIJoHmcAX6IEGOLskygGl19z3VdkV4ol yVJ9z7u6nwgM6F0WkN3ijMViK5eIvXN3eG81cbHjcHGTfE+3Y4avgZCXmWdZtUSCq7J1 mqAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UL8iugcj; 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 j3-20020a17090a94c300b002563e365aeasi3286769pjw.53.2023.06.09.13.29.59; Fri, 09 Jun 2023 13:30:17 -0700 (PDT) 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=UL8iugcj; 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 S232532AbjFIUVm (ORCPT + 99 others); Fri, 9 Jun 2023 16:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232406AbjFIUVI (ORCPT ); Fri, 9 Jun 2023 16:21:08 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A10C420F for ; Fri, 9 Jun 2023 13:20:13 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-4f6195d2b3fso2801928e87.1 for ; Fri, 09 Jun 2023 13:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686341983; x=1688933983; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+CYnae38h+2Ha8DEsswsgC3tiiF77w45gY0ME9hPmK0=; b=UL8iugcjutChamWf42do/iCGYnj6h9Iv5uQA5YnjW/QDyKx8uImL9K+I90O7SQKEUa NFb/AlN9DpFyq1TVbLnXnt4U9uPPScCkXC/QhUFaKkfJ/50LdZWugB0GJWZ6As8nSW8W J6L5MEhAL/Y9zYeTuL0F29DUCocnezsXXppXS1IykNOTuig9Cq+pdEoZvmANK0yEFKNB XTHqJmeMr/0SdYfYv7xWsyt/QOAyjrMC0ZdB0QFr/6DgOR+gm+UCJRlYu/W8HoEyo273 LolbVXzdxgcK4WIK0DzZN4kbeaVWfcKqk9kepY4UL3K4+6ppn9vztHEBn0ScO5C2LpNT 297g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686341983; x=1688933983; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+CYnae38h+2Ha8DEsswsgC3tiiF77w45gY0ME9hPmK0=; b=a5xg7WY6OuD+81Nd3fm0YJNQO4zv3vzh7rOSykylIk6F+wPv/xX/gvDCPSlQBZkUe8 KU9oYcj3mrsnAXqtqVag47G4ydMf+AFU/yiv5Oh86KKCPyt7bjZE2BaU9Atg9jnnBDRK uIwWejuprOd4CmRhxgB2uREk8nD/h6bsLISBmNRa6kTyyH0h0a1qgxJIH5PQ3TpOkQ9n x2Smdy9ZGWOp+kiUOp1jWZjOmpN8fa7FzoFAhKNwYLhC3X8jBe19fLQWd9nlD8ibgxwK Ct3oF2oVy4Jn8gpQR0bsedNleWTnUfWGadNyAdtKKtNPVtJNcytkr8Jatkm/l05Z27JR 05hQ== X-Gm-Message-State: AC+VfDzhJ+cxkm2MA3YRM5wavU10XcIasd7akzF8GjOumO9rvgcKP69K FaBVOCiPMId7FloVIgO/wLqNAg== X-Received: by 2002:a19:3819:0:b0:4f3:b8db:917f with SMTP id f25-20020a193819000000b004f3b8db917fmr1269864lfa.47.1686341982937; Fri, 09 Jun 2023 13:19:42 -0700 (PDT) Received: from [192.168.1.101] (abyj190.neoplus.adsl.tpnet.pl. [83.9.29.190]) by smtp.gmail.com with ESMTPSA id b18-20020ac25632000000b004f628eb7884sm641349lff.232.2023.06.09.13.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 13:19:42 -0700 (PDT) From: Konrad Dybcio Date: Fri, 09 Jun 2023 22:19:26 +0200 Subject: [PATCH v2 21/22] interconnect: qcom: icc-rpm: Set correct bandwidth through RPM bw req MIME-Version: 1.0 Message-Id: <20230526-topic-smd_icc-v2-21-e5934b07d813@linaro.org> References: <20230526-topic-smd_icc-v2-0-e5934b07d813@linaro.org> In-Reply-To: <20230526-topic-smd_icc-v2-0-e5934b07d813@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Georgi Djakov , Leo Yan , Evan Green Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, Konrad Dybcio , Stephan Gerhold X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1686341954; l=1189; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=rnjv1FkG2LZNQA5JLVwzFmZbhzL0mGsmc7rQYDLSsUc=; b=zhTwx3ylCzTTKzeHxgS5M8QzOryBV1e3M4jWd/NtdOoMhFRhPiBs/kBDomlORHIjXnYRAJFFm izzIkf1c7YQDMGQmqCim4qaVSh+CQR1xb1JWlT3M4nsw90QbrU4lMrb X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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?1768258396230453940?= X-GMAIL-MSGID: =?utf-8?q?1768258396230453940?= Currently, we're setting the aggregated-on-provider bandwidth on each node, individually. That is of course incorrect and results in far too high votes. Use the correct values to ensure we're not wasting power. Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver") Reported-by: Stephan Gerhold Signed-off-by: Konrad Dybcio Reviewed-by: Stephan Gerhold --- drivers/interconnect/qcom/icc-rpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c index ac719013077e..1508233632f6 100644 --- a/drivers/interconnect/qcom/icc-rpm.c +++ b/drivers/interconnect/qcom/icc-rpm.c @@ -355,12 +355,12 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst) qcom_icc_bus_aggregate(provider, agg_avg, agg_peak, &max_agg_avg); - ret = qcom_icc_rpm_set(src_qn, agg_avg); + ret = qcom_icc_rpm_set(src_qn, src_qn->sum_avg); if (ret) return ret; if (dst_qn) { - ret = qcom_icc_rpm_set(dst_qn, agg_avg); + ret = qcom_icc_rpm_set(dst_qn, dst_qn->sum_avg); if (ret) return ret; }