devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] cpufreq: qcom-nvmem: Fix power domain scaling
@ 2023-11-14 10:07 Stephan Gerhold
  2023-11-14 10:07 ` [PATCH v3 1/3] cpufreq: qcom-nvmem: Enable virtual power domain devices Stephan Gerhold
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stephan Gerhold @ 2023-11-14 10:07 UTC (permalink / raw)
  To: Viresh Kumar, Ulf Hansson
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Ilia Lin,
	Rafael J. Wysocki, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-pm, linux-arm-msm, linux-kernel, devicetree,
	Stephan Gerhold, Stephan Gerhold, stable

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,
-- 
Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Kernkonzept GmbH at Dresden, Germany, HRB 31129, CEO Dr.-Ing. Michael Hohmuth


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-11-27  4:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14 10:07 [PATCH v3 0/3] cpufreq: qcom-nvmem: Fix power domain scaling Stephan Gerhold
2023-11-14 10:07 ` [PATCH v3 1/3] cpufreq: qcom-nvmem: Enable virtual power domain devices Stephan Gerhold
2023-11-22  9:47   ` Ulf Hansson
2023-11-14 10:07 ` [PATCH v3 2/3] cpufreq: qcom-nvmem: Preserve PM domain votes in system suspend Stephan Gerhold
2023-11-22  9:48   ` Ulf Hansson
2023-11-14 10:07 ` [PATCH v3 3/3] pmdomain: qcom: rpmpd: Set GENPD_FLAG_ACTIVE_WAKEUP Stephan Gerhold
2023-11-22  9:48   ` Ulf Hansson
2023-11-23  7:39 ` [PATCH v3 0/3] cpufreq: qcom-nvmem: Fix power domain scaling Viresh Kumar
2023-11-23 16:14   ` Ulf Hansson
2023-11-27  4:22     ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).