summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-08-10 05:51:49 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-11 12:28:16 -0400
commitf7c5a179fe860524846f1e2b01b25b7af3a89ba6 (patch)
tree9851a1256d089216f0b90b40e867bf1a042bfff2
parent3a83185003c6d59c1264606ed684c6f7a3a998a3 (diff)
gpu: nvgpu: remove railgate lock from gm20b_tegra_postscale
In gm20b_tegra_postscale(), we use platform->railgate_lock to check if GPU is railgated or not But platform->railgate_lock was introduced only to prevent unrailgating in midst of gk20a_do_idle() sequence This lock is not the right way to check railgate status since it is still possible to railgate GPU with this lock being held Hence remove acquire/release of platform->railgate_lock from gm20b_tegra_postscale() Bug 1962265 Change-Id: I6208063de3fa77ed71e8fb0c011367fb66151193 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1536573 (cherry picked from commit 68bce66be338e48f4921f645b10b3fa5994fe1d4) Reviewed-on: https://git-master.nvidia.com/r/1537297 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
index a28f1094..36ca850e 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
@@ -314,15 +314,12 @@ static void gm20b_tegra_postscale(struct device *dev, unsigned long freq)
314 emc_rate = tegra_bwmgr_get_max_emc_rate(); 314 emc_rate = tegra_bwmgr_get_max_emc_rate();
315 315
316 emc_params->freq_last_set = emc_rate; 316 emc_params->freq_last_set = emc_rate;
317 nvgpu_mutex_acquire(&platform->railgate_lock);
318 if (platform->is_railgated && platform->is_railgated(dev)) 317 if (platform->is_railgated && platform->is_railgated(dev))
319 goto done; 318 return;
320 319
321 tegra_bwmgr_set_emc(emc_params->bwmgr_cl, emc_rate, 320 tegra_bwmgr_set_emc(emc_params->bwmgr_cl, emc_rate,
322 TEGRA_BWMGR_SET_EMC_FLOOR); 321 TEGRA_BWMGR_SET_EMC_FLOOR);
323 322
324done:
325 nvgpu_mutex_release(&platform->railgate_lock);
326} 323}
327 324
328#endif 325#endif