summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorSrikar Srimath Tirumala <srikars@nvidia.com>2016-12-15 22:42:42 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-21 02:05:56 -0500
commit34d8421ab4e9ecd0af09f7fefe71b9a1d8781061 (patch)
tree2e728df78c393280b7a6207c58ffe697009b7ab9 /drivers/gpu/nvgpu/gm20b
parent23f9dddbb6c5f3e922addd2f286ad86b710c5573 (diff)
gpu: nvgpu: fix round_rate ops for CCF
Make round_rate return max freq when called with a value greater than the max clock frequency. Bug 200233943 Change-Id: Id128611f2d09b17a0a0edfefd4b526fd8c215bce Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com> Reviewed-on: http://git-master/r/1272305 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com> Tested-by: Jonathan Hunter <jonathanh@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com> Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/clk_gm20b.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
index 060a5775..b1ea7331 100644
--- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
@@ -1305,8 +1305,12 @@ static long gm20b_round_rate(struct clk_hw *hw, unsigned long rate,
1305{ 1305{
1306 struct clk_gk20a *clk = to_clk_gk20a(hw); 1306 struct clk_gk20a *clk = to_clk_gk20a(hw);
1307 u32 freq, old_freq; 1307 u32 freq, old_freq;
1308 unsigned long maxrate;
1308 struct pll tmp_pll; 1309 struct pll tmp_pll;
1309 1310
1311 maxrate = tegra_dvfs_get_maxrate(hw->clk);
1312 gpc_pll_params.max_freq = rate_gpu_to_gpc2clk(maxrate);
1313
1310 mutex_lock(&clk->clk_mutex); 1314 mutex_lock(&clk->clk_mutex);
1311 old_freq = clk->gpc_pll.freq; 1315 old_freq = clk->gpc_pll.freq;
1312 freq = rate_gpu_to_gpc2clk(rate); 1316 freq = rate_gpu_to_gpc2clk(rate);