Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff7639b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: lpm_levels: Fix logic for choosing cpu mode"

parents aab2281f 58109805
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -276,6 +276,16 @@ static int lpm_system_mode_select(struct lpm_system_state *system_state,
		if (!system_level->available)
			continue;

		/* The following check is to support legacy behavior where
		 * only the last online core enters a system low power mode.
		 * This should eventually be removed once all targets support
		 * system low power modes with multiple cores online.
		 */
		if (system_level->sync_level
				&& (num_online_cpus() > 1)
				&& !sys_state.allow_synched_levels)
			continue;

		if (system_level->sync_level &&
			!cpumask_equal(&system_level->num_cpu_votes,
					&num_powered_cores))
@@ -529,16 +539,6 @@ static int lpm_cpu_power_select(struct cpuidle_device *dev, int *index)
		enum msm_pm_sleep_mode mode = level->mode;
		bool allow;

		/* The following check is to support legacy behavior where
		 * only the last online core enters a system low power mode.
		 * This should eventually be removed once all targets support
		 * system low power modes with multiple cores online.
		 */
		if ((level->mode >= sys_state.sync_cpu_mode)
				&& (num_online_cpus() > 1)
				&& !sys_state.allow_synched_levels)
			continue;

		allow = msm_pm_sleep_mode_allow(dev->cpu, mode, true);

		if (!allow)