linux/drivers/pmdomain
Stephan Gerhold 2b391c4ca7 pmdomain: core: Scale down parent/child performance states in reverse order
Power domains might have parent domains assigned that are automatically
managed by the PM domain core. In particular, parent domains are
automatically powered on/off and setting performance states on child
domains are propagated to parent domains (e.g. using an OPP table from the
device tree).

Currently the parent performance state is always adjusted before the
performance state of the child domain, which is a problem for some cases
when scaling down the performance state. More exactly, it may lead to that
the parent domain could run in a lower performance state, than what is
required by the child domain.

To fix the behaviour, let's differentiate between scaling up/down and
adjust the order of operations:

 - When scaling up, parent domains should be adjusted before the child
   domain. In case of an error, the rollback happens in reverse order.

 - When scaling down, parent domains should be adjusted after the child
   domain, in reverse order, just as if we would rollback scaling up.
   In case of an error, the rollback happens in normal order (just as
   if we would normally scale up).

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20240103-genpd-perf-order-v2-1-eeecfc55624b@gerhold.net
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-02-14 10:26:11 +01:00
..
actions pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
amlogic pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain 2023-11-30 12:05:21 +01:00
apple pmdomain: apple: Move Kconfig option to the pmdomain subsystem 2023-09-20 10:08:49 +02:00
arm pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal 2024-02-13 13:04:19 +01:00
bcm pmdomain: Merge branch fixes into next 2023-10-26 16:01:03 +02:00
imx pmdomain: imx93-pd: Convert to platform remove callback returning void 2023-11-30 12:15:35 +01:00
mediatek pmdomain: mediatek: fix race conditions with genpd 2024-01-23 13:19:15 +01:00
qcom Core: 2024-01-12 13:54:25 -08:00
renesas pmdomain: renesas: r8a77980-sysc: CR7 must be always on 2024-01-22 15:49:56 +01:00
rockchip pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
samsung pmdomain: samsung: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
st pmdomain: st: Add a Kconfig option for the ux500 power domain 2023-10-04 23:41:56 +02:00
starfive pmdomain: starfive: Update prefixes for AON power domain 2023-10-04 23:41:57 +02:00
sunxi pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
tegra pmdomain: tegra: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
ti pmdomain: ti: add missing of_node_put 2023-10-17 11:42:29 +02:00
xilinx pmdomain: xilinx/zynqmp: Convert to platform remove callback returning void 2023-11-30 12:15:36 +01:00
core.c pmdomain: core: Scale down parent/child performance states in reverse order 2024-02-14 10:26:11 +01:00
governor.c PM: domains: Move genpd and its governor to the pmdomain subsystem 2023-12-18 12:49:48 +01:00
Kconfig pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem 2023-11-23 17:32:53 +01:00
Makefile PM: domains: Move genpd and its governor to the pmdomain subsystem 2023-12-18 12:49:48 +01:00