summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2017-06-17 02:15:38 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-25 15:54:53 -0400
commitb260df606b759e9d9e82a54e6eda05be18df5bf5 (patch)
treeb611d954dedc3ca5f267eef133fba806048187a1 /drivers/gpu/nvgpu/gm20b/clk_gm20b.c
parent20d1b9a40db337c1d9b83aaacd03336932c19e5f (diff)
gpu: nvgpu: Apply GM20B dfs_det_cal mask
Applied dfs_det_cal field mask when updating DFS external calibration setting to prevent overflow for negative setting (not happening so far with ADC offset always below Vmin, but may be needed if/when ADC fusing changes). Change-Id: I94b415edec84111b957b73ccfc80c1a8640b8e3a Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/1504242 (cherry picked from commit 9b8072ffcc02f6684a56609c25d1d77ed0852f7a) Reviewed-on: https://git-master.nvidia.com/r/1525831 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/clk_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/clk_gm20b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
index addc27bb..8f770e2e 100644
--- a/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/clk_gm20b.c
@@ -416,7 +416,7 @@ static void clk_set_dfs_ext_cal(struct gk20a *g, u32 dfs_det_cal)
416 416
417 data = gk20a_readl(g, trim_gpc_bcast_gpcpll_dvfs2_r()); 417 data = gk20a_readl(g, trim_gpc_bcast_gpcpll_dvfs2_r());
418 data &= ~(BIT(DFS_DET_RANGE + 1) - 1); 418 data &= ~(BIT(DFS_DET_RANGE + 1) - 1);
419 data |= dfs_det_cal; 419 data |= dfs_det_cal & (BIT(DFS_DET_RANGE + 1) - 1);
420 gk20a_writel(g, trim_gpc_bcast_gpcpll_dvfs2_r(), data); 420 gk20a_writel(g, trim_gpc_bcast_gpcpll_dvfs2_r(), data);
421 421
422 data = gk20a_readl(g, trim_sys_gpcpll_dvfs1_r()); 422 data = gk20a_readl(g, trim_sys_gpcpll_dvfs1_r());