Message ID | 20230720-topic-qcm2290_icc-v1-2-7f67f2e259c1@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3306973vqt; Thu, 20 Jul 2023 11:32:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlFWaG0bwF62CUcw9Vm1QTqSiW9LnWaQ7L8QvK0EzTx4FGgYQLXDLuy1xCxmZUsOZZCgX/+V X-Received: by 2002:ac2:4f0d:0:b0:4fd:d3a8:f5b2 with SMTP id k13-20020ac24f0d000000b004fdd3a8f5b2mr3323238lfr.5.1689877936910; Thu, 20 Jul 2023 11:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689877936; cv=none; d=google.com; s=arc-20160816; b=B8BG8PNsejz+pgjPYs1ZhXjPLOln/VMNJm28TYKOLG4v47T90O0snRapNIgWJLzpQ9 1f5GvTuN2MXwQSJ7L03Gd8i0Az8uH3zT9MNQ6bhvwmS123JTbaOnImSCVM+yZZNa+nX7 9BnFRimhaXowl4PXtkhAqaVCHCz7UYi2zJKSUjGmxIuu10zhwHGIHOYaNjWBx84jPe5I zeSj2oCaaco/pGWf4gAyv5ivYKGn/TuXEjSRDyFrVGJZVvphTD0AD3qWcqnr8R8BYuJJ zi5ZL7jLpYJWWYEqNnLypcQFOjsC14805+aH4Sgeu1UDiGqZcfUofSEMV6ixjLgoFhst Ynxw== 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=yJbGKInlejV3VBpG5lEDNq2UlayrlJtje9RzPRt66/k=; fh=6UEh9QsRZB+5SiKTsumfrAyaQ8JNOoFIZEeWUCZ7Tqk=; b=k0too+OzrW6T7FfDDdl+IYGk41YMOo/ifR/ajzpUzzhszjw+saNocwNfasuli8ifNs Bk9kyAXRGhHaDwWqMC/t59f2Svwe/OpbBZV7kzopINEMApT0sNhZC0DuXb1iJcfbzeLf ksXkOc9Gghs0MXPOsWZ8yeOB96BxHY2ZwR6aW77uMfLtp7tL86Lo6pVrkI5veyWYpWpY FtX32wjY1zI3C+glooidnKp/ajs132AaOJIvw8fxEAtQSsC1MO25Vbh0suI1rxxWWWvB ZE0Z2y1SUSdZhWDDW4KRtMxc2oPbR6JWyahKEGUbfAvaRWZLAxUglfToDHENqDyildf1 6krw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lUXvfFB/"; 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 f23-20020a05640214d700b0051df5d3d1ecsi1149711edx.254.2023.07.20.11.31.52; Thu, 20 Jul 2023 11:32:16 -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="lUXvfFB/"; 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 S232005AbjGTSYf (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Thu, 20 Jul 2023 14:24:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231719AbjGTSY3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Jul 2023 14:24:29 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41BDF270C for <linux-kernel@vger.kernel.org>; Thu, 20 Jul 2023 11:24:10 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2b703a0453fso16776631fa.3 for <linux-kernel@vger.kernel.org>; Thu, 20 Jul 2023 11:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689877448; x=1690482248; 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=yJbGKInlejV3VBpG5lEDNq2UlayrlJtje9RzPRt66/k=; b=lUXvfFB/TUTP9i4ubj+/XnDoC2z0EeSV4kj8IPHoFxmNTzAZ2sOtVt6ZjpD4AK/Jtr P9yoiJnwNdDYtgeUSadSscna6eWzWoWdj+lT4h+sqUalqPpyf/NtUqpvGxiUMEYiqSc0 e/naKrZE3sJM27pDBT5OEewYfnx7PeO7RsA9veLGYX+9AEeyJY3F4XGVtBNV5vUGkR/C Fz4uD+WVdU+8qH66tX0QJLDnkTv/xV8ohza82S7kTfRDC0pUKH9eS6cKM1g/KRhiaJ7o TaEjOThGah/45S6sfsa8UZdU2XLAmv+CdFt/Z0H0a+0oMMC4a0IxccPphGEpcYst68ST FKGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689877448; x=1690482248; 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=yJbGKInlejV3VBpG5lEDNq2UlayrlJtje9RzPRt66/k=; b=ftGmcGgjlyy1Op0z9y0/JX0viyXIokzJ0e5w0cxnBlrbEKRL2fGJjDBIO8+1gu/s04 eqTy0YruuSjGuD0b+0O6fa9y+J3aafI7h+DcOVEK/3IwLwEzwkTz1uifBmjFwICZjW/i Im/kz55JMyQMHezTSYeXmyJQc0j6NDjRw9Fe90X7Xn25UmN8OXZdHHUcG97kDVn6YHHy MXIOXCX/UxmnG+f8mFYpiuSV5rCsH71xBqzAsWkRp1KuDtkLRyvsNvXBsmQMJJZXJf7v +TNsrjq+GDxZY6LmLDTCdwqddRfn39FMAJlaRXF+iDTi9OfEAOxQx5GPZHiQ3/D41qct 515w== X-Gm-Message-State: ABy/qLbHrDuGgKT01w2D8zeQ8uqc+U+7GddfZe2J09xCHdYM4s+1E1AN yu+bVslEMElhVuUg89+VYaSVRtV9qRHIM/jfMpmggw== X-Received: by 2002:a05:651c:d7:b0:2b4:6eb0:2a27 with SMTP id 23-20020a05651c00d700b002b46eb02a27mr3212817ljr.17.1689877448302; Thu, 20 Jul 2023 11:24:08 -0700 (PDT) Received: from [192.168.1.101] (abyj181.neoplus.adsl.tpnet.pl. [83.9.29.181]) by smtp.gmail.com with ESMTPSA id g23-20020a2e9397000000b002b31ec01c97sm428304ljh.15.2023.07.20.11.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 11:24:08 -0700 (PDT) From: Konrad Dybcio <konrad.dybcio@linaro.org> Date: Thu, 20 Jul 2023 20:24:01 +0200 Subject: [PATCH 2/2] interconnect: qcom: qcm2290: Enable sync state MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230720-topic-qcm2290_icc-v1-2-7f67f2e259c1@linaro.org> References: <20230720-topic-qcm2290_icc-v1-0-7f67f2e259c1@linaro.org> In-Reply-To: <20230720-topic-qcm2290_icc-v1-0-7f67f2e259c1@linaro.org> To: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Georgi Djakov <djakov@kernel.org>, Shawn Guo <shawn.guo@linaro.org> Cc: Marijn Suijten <marijn.suijten@somainline.org>, linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio <konrad.dybcio@linaro.org> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1689877443; l=848; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=2/Oo4HuXZdKRBcTWrVM14eHjkhJTowhQs8f0byzlaxA=; b=2gODwk7mWvcrH5TQAE0U2G2K/SvZ95dPHXuYPuK3g+M4nAEtnVC0r7SxHnKOKLbIiCVrjsW36 WuqFs51GY1ADgmVf+qN+a2iYVWXF4g5plMugYznKlk5iAxPCiI/xHId 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771965447643779825 X-GMAIL-MSGID: 1771965447643779825 |
Series |
QCM2290 icc fixes
|
|
Commit Message
Konrad Dybcio
July 20, 2023, 6:24 p.m. UTC
Very surprisingly, qcm2290 does not seem to require any interface
clocks. It's therefore safe to enable sync_state to park unused devices.
Do so.
Fixes: 1a14b1ac3935 ("interconnect: qcom: Add QCM2290 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/interconnect/qcom/qcm2290.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Jul 20, 2023 at 08:24:01PM +0200, Konrad Dybcio wrote: > Very surprisingly, qcm2290 does not seem to require any interface > clocks. What does this mean exactly? The interconnect .sync_state() is responsible to drop the initial maximum bandwidth votes, with the assumption that all active devices have voted for the bandwidth they need. How does this relate to "requiring interface clocks"? > It's therefore safe to enable sync_state to park unused devices. > Do so. Doesn't this make everything painfully slow? There are no interconnect consumers at all in qcm2290.dtsi. I would expect that all bandwidths end up at minimum. Thanks, Stephan
On 20.07.2023 21:52, Stephan Gerhold wrote: > On Thu, Jul 20, 2023 at 08:24:01PM +0200, Konrad Dybcio wrote: >> Very surprisingly, qcm2290 does not seem to require any interface >> clocks. > > What does this mean exactly? The interconnect .sync_state() is > responsible to drop the initial maximum bandwidth votes, with the > assumption that all active devices have voted for the bandwidth they > need. How does this relate to "requiring interface clocks"? If it required such clocks to be present, sync_state could not complete, as trying to access some nodes would crash the platform due to unclocked access. > >> It's therefore safe to enable sync_state to park unused devices. >> Do so. > > Doesn't this make everything painfully slow? There are no interconnect > consumers at all in qcm2290.dtsi. I would expect that all bandwidths > end up at minimum. There are no interconnect providers defined in qcm2290.dtsi. Konrad
On Fri, Jul 21, 2023 at 02:03:16PM +0200, Konrad Dybcio wrote: > On 20.07.2023 21:52, Stephan Gerhold wrote: > > On Thu, Jul 20, 2023 at 08:24:01PM +0200, Konrad Dybcio wrote: > >> Very surprisingly, qcm2290 does not seem to require any interface > >> clocks. > > > > What does this mean exactly? The interconnect .sync_state() is > > responsible to drop the initial maximum bandwidth votes, with the > > assumption that all active devices have voted for the bandwidth they > > need. How does this relate to "requiring interface clocks"? > If it required such clocks to be present, sync_state could not > complete, as trying to access some nodes would crash the platform > due to unclocked access. You mean something like the IPA clock that must be active to do the QoS writes? Wouldn't it already crash before .sync_state() then, when the initial max bandwidth votes are being made? > > > > >> It's therefore safe to enable sync_state to park unused devices. > >> Do so. > > > > Doesn't this make everything painfully slow? There are no interconnect > > consumers at all in qcm2290.dtsi. I would expect that all bandwidths > > end up at minimum. > There are no interconnect providers defined in qcm2290.dtsi. Ack, so I guess you're going to add them together with the actual consumers? I think the patch itself is fine. Only the commit message is a bit misleading. The actual change that is being done here is enabling the bandwidth scaling (dropping the max bandwidth votes after .sync_state()). Can you try to clarify the commit message a bit? Thanks, Stephan
On 23.07.2023 13:01, Stephan Gerhold wrote: > On Fri, Jul 21, 2023 at 02:03:16PM +0200, Konrad Dybcio wrote: >> On 20.07.2023 21:52, Stephan Gerhold wrote: >>> On Thu, Jul 20, 2023 at 08:24:01PM +0200, Konrad Dybcio wrote: >>>> Very surprisingly, qcm2290 does not seem to require any interface >>>> clocks. >>> >>> What does this mean exactly? The interconnect .sync_state() is >>> responsible to drop the initial maximum bandwidth votes, with the >>> assumption that all active devices have voted for the bandwidth they >>> need. How does this relate to "requiring interface clocks"? >> If it required such clocks to be present, sync_state could not >> complete, as trying to access some nodes would crash the platform >> due to unclocked access. > > You mean something like the IPA clock that must be active to do the QoS > writes? > > Wouldn't it already crash before .sync_state() then, when the initial > max bandwidth votes are being made? No, the bandwidth votes are fully handled by RPM with no external deps. Only accessing the QoS registers from the AP seems to trigger crashes on unclocked access. But surprisingly, not on this SoC. >>>> It's therefore safe to enable sync_state to park unused devices. >>>> Do so. >>> >>> Doesn't this make everything painfully slow? There are no interconnect >>> consumers at all in qcm2290.dtsi. I would expect that all bandwidths >>> end up at minimum. >> There are no interconnect providers defined in qcm2290.dtsi. > > Ack, so I guess you're going to add them together with the actual > consumers? Correct. > > I think the patch itself is fine. Only the commit message is a bit > misleading. The actual change that is being done here is enabling the > bandwidth scaling (dropping the max bandwidth votes after > .sync_state()). Can you try to clarify the commit message a bit? Yes, I'll resend. Konrad
diff --git a/drivers/interconnect/qcom/qcm2290.c b/drivers/interconnect/qcom/qcm2290.c index c22354f3e667..5bc4b7516608 100644 --- a/drivers/interconnect/qcom/qcm2290.c +++ b/drivers/interconnect/qcom/qcm2290.c @@ -1364,6 +1364,7 @@ static struct platform_driver qcm2290_noc_driver = { .driver = { .name = "qnoc-qcm2290", .of_match_table = qcm2290_noc_of_match, + .sync_state = icc_sync_state, }, }; module_platform_driver(qcm2290_noc_driver);