From bd40bb7ee27355c107df24b12751caa13d632a7a Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 10 Aug 2017 15:21:49 +0530 Subject: [PATCH] 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 Bug 200389183 Change-Id: I6208063de3fa77ed71e8fb0c011367fb66151193 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1536573 (cherry picked from commit 68bce66be338e48f4921f645b10b3fa5994fe1d4) Reviewed-on: https://git-master.nvidia.com/r/1659905 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 999021a4d..ff1aff713 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -357,15 +357,12 @@ static void gm20b_tegra_postscale(struct device *dev, unsigned long freq) emc_rate = tegra_bwmgr_get_max_emc_rate(); emc_params->freq_last_set = emc_rate; - nvgpu_mutex_acquire(&platform->railgate_lock); if (platform->is_railgated && platform->is_railgated(dev)) - goto done; + return; tegra_bwmgr_set_emc(emc_params->bwmgr_cl, emc_rate, TEGRA_BWMGR_SET_EMC_FLOOR); -done: - nvgpu_mutex_release(&platform->railgate_lock); } #endif