summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-06-02 00:09:52 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:56:17 -0500
commit9454529abe0ac42d15df01e36898cd2c840de9c8 (patch)
tree6d965a08f74b72aa948edcb224a4f753d86f3b90 /drivers/gpu/nvgpu/gp10b/therm_gp10b.c
parentc8569f1ebfcdd4546d3674458684c7e1315872a4 (diff)
gpu: nvgpu: Add multiple engine and runlist support
This CL covers the following modification, 1) Added multiple engine_info support 2) Added multiple runlist_info support 3) Initial changes for ASYNC CE support 4) Added ASYNC CE interrupt support for Pascal GPU series 5) Removed hard coded engine_id logic and made generic way 6) Code cleanup for readability JIRA DNVGPU-26 Change-Id: Ibf46a89a5308c82f01040ffa979c5014b3206f8e Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1156022 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-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.c9
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;