Message ID | 20231114-msm8909-cpufreq-v3-0-926097a6e5c1@kernkonzept.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1758607vqg; Tue, 14 Nov 2023 02:08:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5kSqBrr+i383/1mO3qreWiP4G1cfM3mQmtMSz/PRgyxaaWAUFIijuOyayybuWrjZcgCrG X-Received: by 2002:a05:6a20:8f0b:b0:186:2caa:b756 with SMTP id b11-20020a056a208f0b00b001862caab756mr7476251pzk.20.1699956520307; Tue, 14 Nov 2023 02:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699956520; cv=none; d=google.com; s=arc-20160816; b=siISfDOsjJPzNL2h6Iytlhmoa6JKUHxZcp/Xo3MGiRu3olXxpGB8VsWHkOUhL7ktYC PV/cks7ORqZE38FsZCpHsWgfCmAP91iJ9YJ4rgqgsvLxNLB5t+6qH1Uqyc6rf6V3/xPW n7Z0XjADx3ejZz05j+3fv42CJOWDPMacjLxdsf2N8ib/zFNzo94vaOuGX0XAFUrScZLq gqW/5drlZSs7+MzJYNqzm3OmLY+T2nRyT3dMFlrMSPYkWTp/eEc9BE1HKqklF+1jkfj6 gorCbwlyhor48NbzSqMRKrxfyfG8uoO9jq527MSMlVW6lKNxnLjawZSXwyxJ2fTa6bzR VcJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=lnb08R9HF7IxaFru8lvv0AlBanwWuzGilxFh5qu9Cgw=; fh=mH/O2WdYjyW7y4Q4GqtRUwu0yNzAy5Jw/EWynSIFpfo=; b=E/5lqnAPB/jzKrjGffDs2rgQ/RrbmsUYo6YdAqkzx0w7D9TcuXw1t8/ZpqmF6ZmIj+ VHL8jgZPiarDaBB84uMdGwORy/Gws7Uj8Un1bY3IR8CU/uFPrKcYA8M9eyFSitwF0Zey 3fiqZp9u2oJQ4ir53hwac6iLHsvaviLh+zqCYEy62ov/puXwxhAVGpoP3yp3h+oA1gAW rhwLjMAGLsgT+bLEdh28eg+tEnoWqkUpB86y24JPFvc3PAbzM6UTTjPpJuHwxZNeXpWO Pg8MtHE0GZC/ehFCnuR8OQz+QGXLCSwWmXNjEwfSPewn5fCG2vqyYIzEbkf2c5148z9o DLCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=B0lhctY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f22-20020a17090ac29600b0027763b64ea1si12414529pjt.44.2023.11.14.02.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=B0lhctY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BA3B18040C41; Tue, 14 Nov 2023 02:08:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232369AbjKNKIP (ORCPT <rfc822;lhua1029@gmail.com> + 30 others); Tue, 14 Nov 2023 05:08:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbjKNKIN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Nov 2023 05:08:13 -0500 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCD83197; Tue, 14 Nov 2023 02:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:From:References:In-Reply-To:Reply-To: Content-ID:Content-Description; bh=lnb08R9HF7IxaFru8lvv0AlBanwWuzGilxFh5qu9Cgw=; b=B0lhctY9wEXw5rPpcquomTcVF5 imyojfw0Xtm+P2Ztw3e/0xTHGJOAnaC8INQ7wQz9TUoMGxg6inziLUeex2+lXQ9MxbDhAAVheChgb BRfKAVefFGp2feYWZTt56ncPQyvBVv33kpnf3pnb0yMhR9pIOW6a8Naz1xDXUPDD0se5JN8qA/d4p iWuZeJjorEsCM0CEjVe/UnoP/eZ7gryqPihbU7v3zzjJl1LTOBLAZvcqP1FycL1+bCu8o4xE6WWGm SKZQHkTg0jOCkppU767cDeqVQ7LQrK1WR4PnR4B6W1Jk8RQV0/ehYkDVqxOqiEF3SlsoqBpnkON/D ZXuJZPAw==; Received: from [10.22.3.24] (helo=serv1.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1r2qKx-0050az-2v; Tue, 14 Nov 2023 11:08:03 +0100 From: Stephan Gerhold <stephan.gerhold@kernkonzept.com> Subject: [PATCH v3 0/3] cpufreq: qcom-nvmem: Fix power domain scaling Date: Tue, 14 Nov 2023 11:07:42 +0100 Message-Id: <20231114-msm8909-cpufreq-v3-0-926097a6e5c1@kernkonzept.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAO9GU2UC/2XNTQ6CMBCG4auQrq3pDxTqynsYF9JOpSG02GKjE u5uIcYNy/dL5pkZRQgWIjoVMwqQbLTe5eCHAqnu5u6Arc6NGGGcSCLwEIdGEonV+DQBHlgbw3i jQRrDUb4aAxj72sTLNXdn4+TDe3uQ6Lr+LMp2VqKY4FrUCoRoq7Jszz0E13v3gXE6Kj+gVUzsr 1BCm73CskKkYNrIyoiq3CvLsnwBczAyCfoAAAA= To: Viresh Kumar <viresh.kumar@linaro.org>, Ulf Hansson <ulf.hansson@linaro.org> Cc: Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Ilia Lin <ilia.lin@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Stephan Gerhold <stephan@gerhold.net>, Stephan Gerhold <stephan.gerhold@kernkonzept.com>, stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 14 Nov 2023 02:08:33 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782533607911232141 X-GMAIL-MSGID: 1782533607911232141 |
Series |
cpufreq: qcom-nvmem: Fix power domain scaling
|
|
Message
Stephan Gerhold
Nov. 14, 2023, 10:07 a.m. UTC
The power domain scaling setup for QCS404 and MSM8909 in
cpufreq-com-nvmem does not work correctly at the moment because the
genpd core ignores all the performance state votes that are specified in
the CPU OPP table. This happens because nothing in the driver makes the
genpd core aware that the power domains are actively being consumed by
the CPU.
Fix this by marking the devices as runtime active. Also mark the devices
to be in the "awake path" during system suspend so that performance
state votes necessary for the CPU are preserved during system suspend.
While all the patches in this series are needed for full functionality,
the cpufreq and pmdomain patches can be merged independently. There is
no compile-time dependency between those two.
Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
---
Changes in v3:
- Drop patches with MSM8909 definitions that were applied already
- Add extra patch to fix system suspend properly by using
device_set_awake_path() instead of dev_pm_syscore_device()
- Set GENPD_FLAG_ACTIVE_WAKEUP for rpmpd so that performance state votes
needed by the CPU are preserved during suspend
- Link to v2: https://lore.kernel.org/r/20231018-msm8909-cpufreq-v2-0-0962df95f654@kernkonzept.com
Changes in v2:
- Reword commit messages based on discussion with Uffe
- Use generic power domain name "perf" (Uffe)
- Fix pm_runtime error handling (Uffe)
- Add allocation cleanup patch as preparation
- Fix ordering of qcom,msm8909 compatible (Konrad)
- cpufreq-dt-platdev blocklist/dt-bindings patches were applied already
- Link to v1: https://lore.kernel.org/r/20230912-msm8909-cpufreq-v1-0-767ce66b544b@kernkonzept.com
---
Stephan Gerhold (3):
cpufreq: qcom-nvmem: Enable virtual power domain devices
cpufreq: qcom-nvmem: Preserve PM domain votes in system suspend
pmdomain: qcom: rpmpd: Set GENPD_FLAG_ACTIVE_WAKEUP
drivers/cpufreq/qcom-cpufreq-nvmem.c | 73 ++++++++++++++++++++++++++++++++++--
drivers/pmdomain/qcom/rpmpd.c | 1 +
2 files changed, 71 insertions(+), 3 deletions(-)
---
base-commit: b85ea95d086471afb4ad062012a4d73cd328fa86
change-id: 20230906-msm8909-cpufreq-dff238de9ff3
Best regards,
Comments
On 14-11-23, 11:07, Stephan Gerhold wrote: > The power domain scaling setup for QCS404 and MSM8909 in > cpufreq-com-nvmem does not work correctly at the moment because the > genpd core ignores all the performance state votes that are specified in > the CPU OPP table. This happens because nothing in the driver makes the > genpd core aware that the power domains are actively being consumed by > the CPU. > > Fix this by marking the devices as runtime active. Also mark the devices > to be in the "awake path" during system suspend so that performance > state votes necessary for the CPU are preserved during system suspend. > > While all the patches in this series are needed for full functionality, > the cpufreq and pmdomain patches can be merged independently. There is > no compile-time dependency between those two. > > Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> > --- > Changes in v3: > - Drop patches with MSM8909 definitions that were applied already > - Add extra patch to fix system suspend properly by using > device_set_awake_path() instead of dev_pm_syscore_device() > - Set GENPD_FLAG_ACTIVE_WAKEUP for rpmpd so that performance state votes > needed by the CPU are preserved during suspend > - Link to v2: https://lore.kernel.org/r/20231018-msm8909-cpufreq-v2-0-0962df95f654@kernkonzept.com Applied. Thanks. I picked the pmdomain patch too, lemme know if that needs to go via some other tree.
On Thu, 23 Nov 2023 at 08:39, Viresh Kumar <viresh.kumar@linaro.org> wrote: > > On 14-11-23, 11:07, Stephan Gerhold wrote: > > The power domain scaling setup for QCS404 and MSM8909 in > > cpufreq-com-nvmem does not work correctly at the moment because the > > genpd core ignores all the performance state votes that are specified in > > the CPU OPP table. This happens because nothing in the driver makes the > > genpd core aware that the power domains are actively being consumed by > > the CPU. > > > > Fix this by marking the devices as runtime active. Also mark the devices > > to be in the "awake path" during system suspend so that performance > > state votes necessary for the CPU are preserved during system suspend. > > > > While all the patches in this series are needed for full functionality, > > the cpufreq and pmdomain patches can be merged independently. There is > > no compile-time dependency between those two. > > > > Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com> > > --- > > Changes in v3: > > - Drop patches with MSM8909 definitions that were applied already > > - Add extra patch to fix system suspend properly by using > > device_set_awake_path() instead of dev_pm_syscore_device() > > - Set GENPD_FLAG_ACTIVE_WAKEUP for rpmpd so that performance state votes > > needed by the CPU are preserved during suspend > > - Link to v2: https://lore.kernel.org/r/20231018-msm8909-cpufreq-v2-0-0962df95f654@kernkonzept.com > > Applied. Thanks. > > I picked the pmdomain patch too, lemme know if that needs to go via > some other tree. Usually I should pick the pmdomain patches. Although, I thought it may be better to keep this series together. Assuming you are going to send these as fixes for 6.7-rc[n]? In that case, I can just rebase my tree on a later rc if I find any problems. Kind regards Uffe
On 23-11-23, 17:14, Ulf Hansson wrote:
> Assuming you are going to send these as fixes for 6.7-rc[n]?
Yes I will.