Skip to content

Commit 929c573

Browse files
Flavio Ceolingalak
authored andcommitted
pm: policy: Fix residency policy math
The time necessary to resume from a power state has to be added to the minimal residency time to check if there is enough time to go to a particular state. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
1 parent fb88c77 commit 929c573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/pm/policy/policy_residency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct pm_state_info pm_policy_next_state(int32_t ticks)
3434
"min_residency_us < exit_latency_us");
3535

3636
if ((ticks == K_TICKS_FOREVER) ||
37-
(ticks >= (min_residency - exit_latency))) {
37+
(ticks >= (min_residency + exit_latency))) {
3838
LOG_DBG("Selected power state %d "
3939
"(ticks: %d, min_residency: %u)",
4040
pm_min_residency[i].state, ticks,

0 commit comments

Comments
 (0)