aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@labri.fr>2012-08-16 11:00:55 +0200
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:13:13 +1000
commit7d70e9c1c69a5d22588ff5977249ac944d7cdfb0 (patch)
tree98a34b0cd7568d2a9b0faa0e857bba3e5b5dd84b /drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h
parentdrm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table (diff)
downloadlinux-dev-7d70e9c1c69a5d22588ff5977249ac944d7cdfb0.tar.xz
linux-dev-7d70e9c1c69a5d22588ff5977249ac944d7cdfb0.zip
drm/nouveau/therm: rework thermal table parsing
As an accident, it should also fix temperature reading on nv4x. v2: introduce nvbios_therm_entry as advised by darktama Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h b/drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h
new file mode 100644
index 000000000000..a2c4296fc5f6
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h
@@ -0,0 +1,46 @@
+#ifndef __NVBIOS_THERM_H__
+#define __NVBIOS_THERM_H__
+
+struct nouveau_bios;
+
+struct nvbios_therm_threshold {
+ u8 temp;
+ u8 hysteresis;
+};
+
+struct nvbios_therm_sensor {
+ /* diode */
+ s16 slope_mult;
+ s16 slope_div;
+ s16 offset_num;
+ s16 offset_den;
+ s8 offset_constant;
+
+ /* thresholds */
+ struct nvbios_therm_threshold thrs_fan_boost;
+ struct nvbios_therm_threshold thrs_down_clock;
+ struct nvbios_therm_threshold thrs_critical;
+ struct nvbios_therm_threshold thrs_shutdown;
+};
+
+struct nvbios_therm_fan {
+ u16 pwm_freq;
+
+ u8 min_duty;
+ u8 max_duty;
+};
+
+enum nvbios_therm_domain {
+ NVBIOS_THERM_DOMAIN_CORE,
+ NVBIOS_THERM_DOMAIN_AMBIENT,
+};
+
+int
+nvbios_therm_sensor_parse(struct nouveau_bios *, enum nvbios_therm_domain,
+ struct nvbios_therm_sensor *);
+
+int
+nvbios_therm_fan_parse(struct nouveau_bios *, struct nvbios_therm_fan *);
+
+
+#endif