From b3c09961a749215a50f4100ed24bd8ce3b066fe7 Mon Sep 17 00:00:00 2001 From: Kishore Sri venkata Ganesh Bolisetty Date: Thu, 13 Aug 2020 20:59:22 -0700 Subject: [PATCH] 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: Kishore Sri venkata Ganesh Bolisetty --- drivers/soc/qcom/msm_performance.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c index 74ffdcce6dcb..bd8dedfe3515 100644 --- a/drivers/soc/qcom/msm_performance.c +++ b/drivers/soc/qcom/msm_performance.c @@ -77,11 +77,10 @@ static int freq_qos_request_init(void) ret = -EAGAIN; goto cleanup; } - per_cpu(msm_perf_cpu_stats, cpu).min = 0; req = &per_cpu(qos_req_min, cpu); ret = freq_qos_add_request(&policy->constraints, req, - FREQ_QOS_MIN, policy->min); + FREQ_QOS_MIN, FREQ_QOS_MIN_DEFAULT_VALUE); if (ret < 0) { pr_err("%s: Failed to add min freq constraint (%d)\n", __func__, ret); @@ -92,7 +91,7 @@ static int freq_qos_request_init(void) per_cpu(msm_perf_cpu_stats, cpu).max = UINT_MAX; req = &per_cpu(qos_req_max, cpu); ret = freq_qos_add_request(&policy->constraints, req, - FREQ_QOS_MAX, policy->max); + FREQ_QOS_MAX, FREQ_QOS_MAX_DEFAULT_VALUE); if (ret < 0) { pr_err("%s: Failed to add max freq constraint (%d)\n", __func__, ret);