summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/therm_gp106.c
diff options
context:
space:
mode:
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}