From 57dd904196b8d0177885dc146f77a5e00078f80c Mon Sep 17 00:00:00 2001 From: Ritesh Harjani Date: Tue, 28 Mar 2017 13:19:26 +0530 Subject: [PATCH] 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 --- drivers/mmc/host/sdhci-msm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index b696f54286da..3e51c9a86250 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -3913,8 +3913,8 @@ void sdhci_msm_pm_qos_cpu_init(struct sdhci_host *host, group->req.type = PM_QOS_REQ_AFFINE_CORES; cpumask_copy(&group->req.cpus_affine, &msm_host->pdata->pm_qos_data.cpu_group_map.mask[i]); - /* For initialization phase, set the performance mode latency */ - group->latency = latency[i].latency[SDHCI_PERFORMANCE_MODE]; + /* We set default latency here for all pm_qos cpu groups. */ + group->latency = PM_QOS_DEFAULT_VALUE; pm_qos_add_request(&group->req, PM_QOS_CPU_DMA_LATENCY, group->latency); pr_info("%s (): voted for group #%d (mask=0x%lx) latency=%d (0x%p)\n",