Files
android_kernel_xiaomi_sm8450/include/linux/pm_domain.h
Lina Iyer fb8304fcb8 UPSTREAM: PM: domains: use device's next wakeup to determine domain idle state
Currently, a PM domain's idle state is determined based on whether the
QoS requirements are met. However, even entering an idle state may waste
power if the minimum residency requirements aren't fulfilled.

CPU PM domains use the next timer wakeup for the CPUs in the domain to
determine the sleep duration of the domain. This is compared with the
idle state residencies to determine the optimal idle state. For other PM
domains, determining the sleep length is not that straight forward. But
if the device's next_event is available, we can use that to determine
the sleep duration of the PM domain.

Let's update the domain governor logic to check for idle state residency
based on the next wakeup of devices as well as QoS constraints. But
since, not all domains may contain devices capable of specifying the
next wakeup, let's enable this additional check only if specified by the
domain's flags when initializing the domain.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit c79aa080fb0f60a0e24c87014dc9c2f373e1379b)
Bug: 170654157
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I70714c4d5840034771b2b4a6b1d38eb4c73d1f85
2021-04-23 18:42:36 -07:00

13 KiB