From f7c5a179fe860524846f1e2b01b25b7af3a89ba6 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 10 Aug 2017 15:21:49 +0530 Subject: 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 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 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux') 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) 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 -- cgit v1.2.2