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

Commit 1e1a85c4 authored by Venkat Devarasetty's avatar Venkat Devarasetty Committed by Gerrit - the friendly Code Review server
Browse files

msm: lpm: do not allow system level modes if pending rpm ack



Do not allow APSS cores to enter system level mode if there
is a pending acknowledge from RPM. At the same time allow
cores to enter individual power collapse as the cpu collapse
overhead time is low as compared to system level modes.

Change-Id: I6bb4048529690b4ceee8555b27444ece6da82e4a
Signed-off-by: default avatarVenkat Devarasetty <vdevaras@codeaurora.org>
parent 289877fa
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -270,14 +270,6 @@ static int cpu_power_select(struct cpuidle_device *dev,

		if (!allow)
			continue;
		/*
		 * TODO:
		 * use per_cpu pm_qos to prevent low power modes based on
		 * latency
		 */
		if (mode >= MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)
			if (!dev->cpu && msm_rpm_waiting_for_ack())
				break;

		lvl_latency_us = pwr_params->latency_us;

@@ -386,6 +378,14 @@ static int cluster_select(struct lpm_cluster *cluster, bool from_idle)
	if (!cluster)
		return -EINVAL;

	/*
	 * TODO:
	 * use per_cpu pm_qos to prevent low power modes based on
	 * latency
	 */
	if (msm_rpm_waiting_for_ack())
		return best_level;

	sleep_us = (uint32_t)get_cluster_sleep_time(cluster, NULL, from_idle);

	if (cpumask_and(&mask, cpu_online_mask, &cluster->child_cpus))