From d7e3da9b8b85b1b72fbf34fb78b8b61970f8af79 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Wed, 10 May 2017 21:35:03 -0700 Subject: [PATCH] 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 (cherry picked from commit ab22d66386e3a23e0dfe897bca25e01623f6d61c) Reviewed-on: http://git-master/r/1482812 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Shreshtha Sahu Reviewed-by: Rajkumar Kasirajan Tested-by: Rajkumar Kasirajan Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu --- drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index a95bd08ee..7c89a2a62 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c @@ -358,7 +358,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,