summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
diff options
context:
space:
mode:
authorSeshendra Gadagottu <sgadagottu@nvidia.com>2016-04-20 20:00:30 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:54:54 -0500
commit24568369348cbe1a09d279b65d772d320128228b (patch)
tree7afe96e3aed2ea9a6eb158b7abfabc651570caf9 /drivers/gpu/nvgpu/gp10b/therm_gp10b.c
parentd0965c746d1824b34b589952b247fe5f0e23f8ea (diff)
gpu: nvgpu: gp10b: add delay cycles before elcg
Update prod value for gr engine delay cycles before engine clock gating. For copy engine, it was updated earlier and now it is extended to both gr and ce. Bug 1689806 Change-Id: I457ad6f9c461db89d53c57e68ad937ab5292849e Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1129922 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/therm_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/therm_gp10b.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
index 687593b0..5763b3b1 100644
--- a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
@@ -81,12 +81,15 @@ static int gp10b_init_therm_setup_hw(struct gk20a *g)
81static int gp10b_update_therm_gate_ctrl(struct gk20a *g) 81static int gp10b_update_therm_gate_ctrl(struct gk20a *g)
82{ 82{
83 u32 gate_ctrl; 83 u32 gate_ctrl;
84 84 u32 engine_id;
85 gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A)); 85
86 gate_ctrl = set_field(gate_ctrl, 86 for (engine_id = 0; engine_id < ENGINE_INVAL_GK20A; engine_id++) {
87 therm_gate_ctrl_eng_delay_before_m(), 87 gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine_id));
88 therm_gate_ctrl_eng_delay_before_f(4)); 88 gate_ctrl = set_field(gate_ctrl,
89 gk20a_writel(g, therm_gate_ctrl_r(ENGINE_CE2_GK20A), gate_ctrl); 89 therm_gate_ctrl_eng_delay_before_m(),
90 therm_gate_ctrl_eng_delay_before_f(4));
91 gk20a_writel(g, therm_gate_ctrl_r(engine_id), gate_ctrl);
92 }
90 93
91 return 0; 94 return 0;
92} 95}