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>
This commit is contained in:
Deepak Nibade
2017-08-10 15:21:49 +05:30
committed by mobile promotions
parent 3a83185003
commit f7c5a179fe

View File

@@ -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