mmc: sdhci-msm: Change pm_qos cpu groups latency to PM_QOS_DEFAULT_VALUE

In current pm_qos implementation - when the new pm_qos vote request
comes, the previous cpu group where pm_qos vote was put
is determined and removed if the current cpu group is different
than previous.

If the pm_qos vote of performance mode latency is put during
initialization, there can be a case where this vote will never be
released - since during init phase we can't cache the prev pm_qos cpu
group (pm_qos_prev_cpu = -1). Thus during the actual I/O sdhci_request
the pm_qos_prev_cpu will be -1 and unless the request comes once onto
each of those cpu group, the pm_qos voting can never be released.

Hence change this pm_qos vote for all cpu groups to PM_QOS_DEFAULT_VALUE
during init phase.

Change-Id: I71249b58f41850a8a84e6165d6df936eba13b218
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
This commit is contained in:
Ritesh Harjani 2017-03-28 13:19:26 +05:30
parent f4a611a3af
commit 57dd904196

View file

@ -3913,8 +3913,8 @@ void sdhci_msm_pm_qos_cpu_init(struct sdhci_host *host,
group->req.type = PM_QOS_REQ_AFFINE_CORES; group->req.type = PM_QOS_REQ_AFFINE_CORES;
cpumask_copy(&group->req.cpus_affine, cpumask_copy(&group->req.cpus_affine,
&msm_host->pdata->pm_qos_data.cpu_group_map.mask[i]); &msm_host->pdata->pm_qos_data.cpu_group_map.mask[i]);
/* For initialization phase, set the performance mode latency */ /* We set default latency here for all pm_qos cpu groups. */
group->latency = latency[i].latency[SDHCI_PERFORMANCE_MODE]; group->latency = PM_QOS_DEFAULT_VALUE;
pm_qos_add_request(&group->req, PM_QOS_CPU_DMA_LATENCY, pm_qos_add_request(&group->req, PM_QOS_CPU_DMA_LATENCY,
group->latency); group->latency);
pr_info("%s (): voted for group #%d (mask=0x%lx) latency=%d (0x%p)\n", pr_info("%s (): voted for group #%d (mask=0x%lx) latency=%d (0x%p)\n",