From ab22d66386e3a23e0dfe897bca25e01623f6d61c Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Wed, 10 May 2017 21:35:03 -0700 Subject: gpu: nvgpu: tegra: Fix EMC frequency scaling Before this commit call to EMC BWMGR in postscale procedure was skipped when GPU rail is ON (= GPU is running). It should be the other way around - call should be skipped when GPU is rail-gated. Bug 200267304 Change-Id: Id4da84b3d0ed0606017cc53a58e2917d486fa13e Signed-off-by: Alex Frid Reviewed-on: http://git-master/r/1479769 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c index 996fd251..5a178960 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c @@ -379,7 +379,7 @@ static void gm20b_tegra_postscale(struct device *dev, unsigned long freq) emc_params->freq_last_set = emc_rate; nvgpu_mutex_acquire(&platform->railgate_lock); - if (platform->is_railgated && !platform->is_railgated(dev)) + if (platform->is_railgated && platform->is_railgated(dev)) goto done; tegra_bwmgr_set_emc(emc_params->bwmgr_cl, emc_rate, -- cgit v1.2.2