diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/therm_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/therm_gp10b.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c index 5763b3b1..63efc945 100644 --- a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c | |||
@@ -82,13 +82,16 @@ static int gp10b_update_therm_gate_ctrl(struct gk20a *g) | |||
82 | { | 82 | { |
83 | u32 gate_ctrl; | 83 | u32 gate_ctrl; |
84 | u32 engine_id; | 84 | u32 engine_id; |
85 | u32 active_engine_id = 0; | ||
86 | struct fifo_gk20a *f = &g->fifo; | ||
85 | 87 | ||
86 | for (engine_id = 0; engine_id < ENGINE_INVAL_GK20A; engine_id++) { | 88 | for (engine_id = 0; engine_id < f->num_engines; engine_id++) { |
87 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine_id)); | 89 | active_engine_id = f->active_engines_list[engine_id]; |
90 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(active_engine_id)); | ||
88 | gate_ctrl = set_field(gate_ctrl, | 91 | gate_ctrl = set_field(gate_ctrl, |
89 | therm_gate_ctrl_eng_delay_before_m(), | 92 | therm_gate_ctrl_eng_delay_before_m(), |
90 | therm_gate_ctrl_eng_delay_before_f(4)); | 93 | therm_gate_ctrl_eng_delay_before_f(4)); |
91 | gk20a_writel(g, therm_gate_ctrl_r(engine_id), gate_ctrl); | 94 | gk20a_writel(g, therm_gate_ctrl_r(active_engine_id), gate_ctrl); |
92 | } | 95 | } |
93 | 96 | ||
94 | return 0; | 97 | return 0; |