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

Commit b3c09961 authored by Kishore Sri venkata Ganesh Bolisetty's avatar Kishore Sri venkata Ganesh Bolisetty
Browse files

soc: qcom: msm_perf: use cpuinfo.min/max while adding freq qos request



cpuinfo.min_freq/max_freq gives the real min/max frequencies available.
whereas policy min/max offer current min/max of the policy, which
may be the desired values set by any other client like msm_perf or
even a postboot setting. This can potentially limit min/max
frequencies ranges.

Change-Id: Ia7978ccd99b419f68d06fec24dac1adfacff36b7
Signed-off-by: default avatarKishore Sri venkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
parent d8534164
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -77,11 +77,10 @@ static int freq_qos_request_init(void)
			ret = -EAGAIN;
			ret = -EAGAIN;
			goto cleanup;
			goto cleanup;
		}
		}

		per_cpu(msm_perf_cpu_stats, cpu).min = 0;
		per_cpu(msm_perf_cpu_stats, cpu).min = 0;
		req = &per_cpu(qos_req_min, cpu);
		req = &per_cpu(qos_req_min, cpu);
		ret = freq_qos_add_request(&policy->constraints, req,
		ret = freq_qos_add_request(&policy->constraints, req,
			FREQ_QOS_MIN, policy->min);
			FREQ_QOS_MIN, FREQ_QOS_MIN_DEFAULT_VALUE);
		if (ret < 0) {
		if (ret < 0) {
			pr_err("%s: Failed to add min freq constraint (%d)\n",
			pr_err("%s: Failed to add min freq constraint (%d)\n",
				__func__, ret);
				__func__, ret);
@@ -92,7 +91,7 @@ static int freq_qos_request_init(void)
		per_cpu(msm_perf_cpu_stats, cpu).max = UINT_MAX;
		per_cpu(msm_perf_cpu_stats, cpu).max = UINT_MAX;
		req = &per_cpu(qos_req_max, cpu);
		req = &per_cpu(qos_req_max, cpu);
		ret = freq_qos_add_request(&policy->constraints, req,
		ret = freq_qos_add_request(&policy->constraints, req,
			FREQ_QOS_MAX, policy->max);
			FREQ_QOS_MAX, FREQ_QOS_MAX_DEFAULT_VALUE);
		if (ret < 0) {
		if (ret < 0) {
			pr_err("%s: Failed to add max freq constraint (%d)\n",
			pr_err("%s: Failed to add max freq constraint (%d)\n",
				__func__, ret);
				__func__, ret);