diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/therm_gv11b.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_therm_gv11b.h | 34 |
2 files changed, 41 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c index f2d929fa..fe843325 100644 --- a/drivers/gpu/nvgpu/gv11b/therm_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/therm_gv11b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GV11B Therm | 2 | * GV11B Therm |
3 | * | 3 | * |
4 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2015-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -81,12 +81,18 @@ int gv11b_init_therm_setup_hw(struct gk20a *g) | |||
81 | gk20a_writel(g, therm_config2_r(), v); | 81 | gk20a_writel(g, therm_config2_r(), v); |
82 | 82 | ||
83 | gk20a_writel(g, therm_grad_stepping1_r(), | 83 | gk20a_writel(g, therm_grad_stepping1_r(), |
84 | therm_grad_stepping1_pdiv_duration_f(0x40)); | 84 | therm_grad_stepping1_pdiv_duration_f(0xbf4)); |
85 | 85 | ||
86 | v = gk20a_readl(g, therm_grad_stepping0_r()); | 86 | v = gk20a_readl(g, therm_grad_stepping0_r()); |
87 | v |= therm_grad_stepping0_feature_enable_f(); | 87 | v |= therm_grad_stepping0_feature_enable_f(); |
88 | gk20a_writel(g, therm_grad_stepping0_r(), v); | 88 | gk20a_writel(g, therm_grad_stepping0_r(), v); |
89 | 89 | ||
90 | /* disable idle clock slowdown */ | ||
91 | v = therm_clk_slowdown_2_idle_condition_a_select_f(0) | | ||
92 | therm_clk_slowdown_2_idle_condition_a_type_never_f() | | ||
93 | therm_clk_slowdown_2_idle_condition_b_type_never_f(); | ||
94 | gk20a_writel(g, therm_clk_slowdown_2_r(0), v); | ||
95 | |||
90 | return 0; | 96 | return 0; |
91 | } | 97 | } |
92 | 98 | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_therm_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_therm_gv11b.h index 3afe7501..0050083c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_therm_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_therm_gv11b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -332,6 +332,38 @@ static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) | |||
332 | { | 332 | { |
333 | return 0x0U; | 333 | return 0x0U; |
334 | } | 334 | } |
335 | static inline u32 therm_clk_slowdown_2_r(u32 i) | ||
336 | { | ||
337 | return 0x000201a0U + i*4U; | ||
338 | } | ||
339 | static inline u32 therm_clk_slowdown_2_idle_condition_a_select_f(u32 v) | ||
340 | { | ||
341 | return (v & 0xfU) << 0U; | ||
342 | } | ||
343 | static inline u32 therm_clk_slowdown_2_idle_condition_a_type_f(u32 v) | ||
344 | { | ||
345 | return (v & 0x7U) << 4U; | ||
346 | } | ||
347 | static inline u32 therm_clk_slowdown_2_idle_condition_a_type_v(u32 r) | ||
348 | { | ||
349 | return (r >> 4U) & 0x7U; | ||
350 | } | ||
351 | static inline u32 therm_clk_slowdown_2_idle_condition_a_type_never_f(void) | ||
352 | { | ||
353 | return 0x40U; | ||
354 | } | ||
355 | static inline u32 therm_clk_slowdown_2_idle_condition_b_type_f(u32 v) | ||
356 | { | ||
357 | return (v & 0x7U) << 12U; | ||
358 | } | ||
359 | static inline u32 therm_clk_slowdown_2_idle_condition_b_type_v(u32 r) | ||
360 | { | ||
361 | return (r >> 12U) & 0x7U; | ||
362 | } | ||
363 | static inline u32 therm_clk_slowdown_2_idle_condition_b_type_never_f(void) | ||
364 | { | ||
365 | return 0x4000U; | ||
366 | } | ||
335 | static inline u32 therm_grad_stepping_table_r(u32 i) | 367 | static inline u32 therm_grad_stepping_table_r(u32 i) |
336 | { | 368 | { |
337 | return 0x000202c8U + i*4U; | 369 | return 0x000202c8U + i*4U; |