1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVBIOS_THERM_H__
3 #define __NVBIOS_THERM_H__
4 struct nvbios_therm_threshold
{
9 struct nvbios_therm_sensor
{
18 struct nvbios_therm_threshold thrs_fan_boost
;
19 struct nvbios_therm_threshold thrs_down_clock
;
20 struct nvbios_therm_threshold thrs_critical
;
21 struct nvbios_therm_threshold thrs_shutdown
;
24 enum nvbios_therm_fan_type
{
25 NVBIOS_THERM_FAN_UNK
= 0,
26 NVBIOS_THERM_FAN_TOGGLE
= 1,
27 NVBIOS_THERM_FAN_PWM
= 2,
30 /* no vbios have more than 6 */
31 #define NVKM_TEMP_FAN_TRIP_MAX 10
32 struct nvbios_therm_trip_point
{
38 enum nvbios_therm_fan_mode
{
39 NVBIOS_THERM_FAN_TRIP
= 0,
40 NVBIOS_THERM_FAN_LINEAR
= 1,
41 NVBIOS_THERM_FAN_OTHER
= 2,
44 struct nvbios_therm_fan
{
45 enum nvbios_therm_fan_type type
;
55 enum nvbios_therm_fan_mode fan_mode
;
56 struct nvbios_therm_trip_point trip
[NVKM_TEMP_FAN_TRIP_MAX
];
62 enum nvbios_therm_domain
{
63 NVBIOS_THERM_DOMAIN_CORE
,
64 NVBIOS_THERM_DOMAIN_AMBIENT
,
68 nvbios_therm_sensor_parse(struct nvkm_bios
*, enum nvbios_therm_domain
,
69 struct nvbios_therm_sensor
*);
72 nvbios_therm_fan_parse(struct nvkm_bios
*, struct nvbios_therm_fan
*);