summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/therm_gp106.c
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-11-07 05:24:56 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-10 06:55:05 -0500
commitd06966c4d9eefa823dd25b87224c2c4c489630e2 (patch)
tree034e9b4b566d01738fe860dedd0d822d5a311a74 /drivers/gpu/nvgpu/gp106/therm_gp106.c
parent8a63a431c4ab42e8531614fd69e460b7fdc5e31f (diff)
gpu: nvgpu: Add thermal alert event handling
* Added the thermal alert event handling * Added the thermal alert event PMU RPC JIRA DNVGPU-130 Bug 200231080 Change-Id: I54ab0dc35a940e70733238fd95669db28389619a Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1248968 (cherry picked from commit a20593c89a374d64201e4720552160a65533ecc3) Reviewed-on: http://git-master/r/1282076 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/therm_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/therm_gp106.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/therm_gp106.c b/drivers/gpu/nvgpu/gp106/therm_gp106.c
index 7bdf0b9e..bbcc5c80 100644
--- a/drivers/gpu/nvgpu/gp106/therm_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/therm_gp106.c
@@ -14,6 +14,7 @@
14#include "therm_gp106.h" 14#include "therm_gp106.h"
15#include <linux/debugfs.h> 15#include <linux/debugfs.h>
16#include "hw_therm_gp106.h" 16#include "hw_therm_gp106.h"
17#include "therm/thrmpmu.h"
17 18
18static void gp106_get_internal_sensor_limits(s32 *max_24_8, s32 *min_24_8) 19static void gp106_get_internal_sensor_limits(s32 *max_24_8, s32 *min_24_8)
19{ 20{
@@ -117,6 +118,18 @@ static int gp106_elcg_init_idle_filters(struct gk20a *g)
117 return 0; 118 return 0;
118} 119}
119 120
121static u32 gp106_configure_therm_alert(struct gk20a *g, s32 curr_warn_temp)
122{
123 u32 err = 0;
124
125 if (g->curr_warn_temp != curr_warn_temp) {
126 g->curr_warn_temp = curr_warn_temp;
127 err = therm_configure_therm_alert(g);
128 }
129
130 return err;
131}
132
120void gp106_init_therm_ops(struct gpu_ops *gops) { 133void gp106_init_therm_ops(struct gpu_ops *gops) {
121#ifdef CONFIG_DEBUG_FS 134#ifdef CONFIG_DEBUG_FS
122 gops->therm.therm_debugfs_init = gp106_therm_debugfs_init; 135 gops->therm.therm_debugfs_init = gp106_therm_debugfs_init;
@@ -125,4 +138,5 @@ void gp106_init_therm_ops(struct gpu_ops *gops) {
125 gops->therm.get_internal_sensor_curr_temp = gp106_get_internal_sensor_curr_temp; 138 gops->therm.get_internal_sensor_curr_temp = gp106_get_internal_sensor_curr_temp;
126 gops->therm.get_internal_sensor_limits = 139 gops->therm.get_internal_sensor_limits =
127 gp106_get_internal_sensor_limits; 140 gp106_get_internal_sensor_limits;
141 gops->therm.configure_therm_alert = gp106_configure_therm_alert;
128} 142}