From 8ccfe2569c924c5f13f09baf54cedcc6d04fc18b Mon Sep 17 00:00:00 2001 From: Peter Boonstoppel Date: Mon, 12 Dec 2016 17:00:55 -0800 Subject: gpu: nvgpu: gm20b pass correct clk to tegra_dvfs Restoring original behavior. Use gbus instead of gpu_ref clk as the argument to tegra_dvfs_get_fmax_at_vmin_safe_t(). Bug was introduced due to refactoring in 01e61860fafbc0ee045c2db931a79f6c0d5300aa, changing behavior when nvgpu is compiled with CONFIG_TEGRA_CLK_FRAMEWORK. Bug 200233943 Change-Id: Id2deec0107bd0c26a12feb511db22fc69e09a985 Signed-off-by: Peter Boonstoppel Reviewed-on: http://git-master/r/1269848 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jonathan Hunter Tested-by: Jonathan Hunter GVS: Gerrit_Virtual_Submit Reviewed-by: Shreshtha Sahu --- drivers/gpu/nvgpu/gm20b/clk_gm20b.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/clk_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c index 25503ea1..501be537 100644 --- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c @@ -1155,8 +1155,7 @@ static int gm20b_init_clk_setup_sw(struct gk20a *g) clk->gpc_pll.id = GK20A_GPC_PLL; clk->gpc_pll.clk_in = clk_get_rate(ref) / KHZ; - safe_rate = tegra_dvfs_get_fmax_at_vmin_safe_t( - clk_get_parent(c)); + safe_rate = tegra_dvfs_get_fmax_at_vmin_safe_t(c); safe_rate = safe_rate * (100 - DVFS_SAFE_MARGIN) / 100; dvfs_safe_max_freq = rate_gpu_to_gpc2clk(safe_rate); clk->gpc_pll.PL = (dvfs_safe_max_freq == 0) ? 0 : -- cgit v1.2.2