Skip to content

Commit 5af7f59

Browse files
committed
pmdomain: core: Update the rejected/usage counters at system suspend too
During system suspend we may try to enter a low power-state for the genpd in question. Let's take this into account for the statistics too, by updating the rejected/usage counters for the corresponding state. Signed-off-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fdea114 commit 5af7f59

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/pmdomain/core.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,12 @@ static void genpd_sync_power_off(struct generic_pm_domain *genpd, bool use_lock,
11781178

11791179
/* Choose the deepest state when suspending */
11801180
genpd->state_idx = genpd->state_count - 1;
1181-
if (_genpd_power_off(genpd, false))
1181+
if (_genpd_power_off(genpd, false)) {
1182+
genpd->states[genpd->state_idx].rejected++;
11821183
return;
1184+
} else {
1185+
genpd->states[genpd->state_idx].usage++;
1186+
}
11831187

11841188
genpd->status = GENPD_STATE_OFF;
11851189

0 commit comments

Comments
 (0)