diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/therm_gp10b.c | 14 |
2 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h index 17b1fb7e..8a587b7c 100644 --- a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -246,6 +246,14 @@ static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) | |||
246 | { | 246 | { |
247 | return 0x7 << 13; | 247 | return 0x7 << 13; |
248 | } | 248 | } |
249 | static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v) | ||
250 | { | ||
251 | return (v & 0xf) << 16; | ||
252 | } | ||
253 | static inline u32 therm_gate_ctrl_eng_delay_before_m(void) | ||
254 | { | ||
255 | return 0xf << 16; | ||
256 | } | ||
249 | static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) | 257 | static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) |
250 | { | 258 | { |
251 | return (v & 0xf) << 20; | 259 | return (v & 0xf) << 20; |
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c index 7bf0c0e5..687593b0 100644 --- a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c | |||
@@ -78,8 +78,22 @@ static int gp10b_init_therm_setup_hw(struct gk20a *g) | |||
78 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | 80 | ||
81 | static int gp10b_update_therm_gate_ctrl(struct gk20a *g) | ||
82 | { | ||
83 | u32 gate_ctrl; | ||
84 | |||
85 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A)); | ||
86 | gate_ctrl = set_field(gate_ctrl, | ||
87 | therm_gate_ctrl_eng_delay_before_m(), | ||
88 | therm_gate_ctrl_eng_delay_before_f(4)); | ||
89 | gk20a_writel(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A), gate_ctrl); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
81 | void gp10b_init_therm_ops(struct gpu_ops *gops) | 94 | void gp10b_init_therm_ops(struct gpu_ops *gops) |
82 | { | 95 | { |
83 | gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw; | 96 | gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw; |
97 | gops->therm.update_therm_gate_ctrl = gp10b_update_therm_gate_ctrl; | ||
84 | 98 | ||
85 | } | 99 | } |