summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
diff options
context:
space:
mode:
authorSeshendra Gadagottu <sgadagottu@nvidia.com>2015-10-22 18:31:43 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:09 -0500
commit313fcdb1d3c12026246df01c81e2ecd212132de8 (patch)
tree8e55a6c8777688275d067cb5110c518b1e897ad8 /drivers/gpu/nvgpu/gp10b/therm_gp10b.c
parent35e3018be12b56ecfa8487ba479cb2df38c6fbf3 (diff)
gpu: nvgpu: gp10b: update thermal programming
Add required fileds and values for thermal slow-down settings in thermal header file and corrected thermal register programming with correct values. Bug 1695567 Reviewed-on: http://git-master/r/822200 (cherry picked from commit 859d1bda6a059b321d859c887fab8d51d2caa981) Change-Id: Id90ebd46bc3d6e4284a91e7f2b775d78502a3eca Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/823013 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.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
new file mode 100644
index 00000000..471edb87
--- /dev/null
+++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c
@@ -0,0 +1,46 @@
1/*
2 * drivers/gpu/nvgpu/gm20b/therm_gk20a.c
3 *
4 * GP10B Therm
5 *
6 * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 */
17
18#include "gk20a/gk20a.h"
19#include "hw_therm_gp10b.h"
20
21static int gp10b_init_therm_setup_hw(struct gk20a *g)
22{
23 gk20a_dbg_fn("");
24
25 /* program NV_THERM registers */
26 gk20a_writel(g, therm_use_a_r(), therm_use_a_ext_therm_0_enable_f() |
27 therm_use_a_ext_therm_1_enable_f() |
28 therm_use_a_ext_therm_2_enable_f());
29 gk20a_writel(g, therm_evt_ext_therm_0_r(),
30 therm_evt_ext_therm_0_slow_factor_f(
31 therm_evt_ext_therm_0_slow_factor_init_v()));
32 gk20a_writel(g, therm_evt_ext_therm_1_r(),
33 therm_evt_ext_therm_1_slow_factor_f(
34 therm_evt_ext_therm_1_slow_factor_init_v()));
35 gk20a_writel(g, therm_evt_ext_therm_2_r(),
36 therm_evt_ext_therm_2_slow_factor_f(
37 therm_evt_ext_therm_2_slow_factor_init_v()));
38
39 return 0;
40}
41
42void gp10b_init_therm_ops(struct gpu_ops *gops)
43{
44 gops->therm.init_therm_setup_hw = gp10b_init_therm_setup_hw;
45
46}