]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - drivers/gpu/drm/nouveau/core/include/subdev/bios/therm.h
Merge tag 'pm+acpi-3.15-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae...
[mirror_ubuntu-hirsute-kernel.git] / drivers / gpu / drm / nouveau / core / include / subdev / bios / therm.h
CommitLineData
7d70e9c1
MP
1#ifndef __NVBIOS_THERM_H__
2#define __NVBIOS_THERM_H__
3
4struct nouveau_bios;
5
6struct nvbios_therm_threshold {
7 u8 temp;
8 u8 hysteresis;
9};
10
11struct nvbios_therm_sensor {
12 /* diode */
13 s16 slope_mult;
14 s16 slope_div;
15 s16 offset_num;
16 s16 offset_den;
17 s8 offset_constant;
18
19 /* thresholds */
20 struct nvbios_therm_threshold thrs_fan_boost;
21 struct nvbios_therm_threshold thrs_down_clock;
22 struct nvbios_therm_threshold thrs_critical;
23 struct nvbios_therm_threshold thrs_shutdown;
24};
25
06afd4e8
MP
26/* no vbios have more than 6 */
27#define NOUVEAU_TEMP_FAN_TRIP_MAX 10
28struct nouveau_therm_trip_point {
29 int fan_duty;
30 int temp;
31 int hysteresis;
32};
33
0e994d64
MP
34enum nvbios_therm_fan_mode {
35 NVBIOS_THERM_FAN_TRIP = 0,
36 NVBIOS_THERM_FAN_LINEAR = 1,
37 NVBIOS_THERM_FAN_OTHER = 2,
38};
39
7d70e9c1
MP
40struct nvbios_therm_fan {
41 u16 pwm_freq;
42
43 u8 min_duty;
44 u8 max_duty;
06afd4e8
MP
45
46 u16 bump_period;
47 u16 slow_down_period;
48
0e994d64 49 enum nvbios_therm_fan_mode fan_mode;
06afd4e8
MP
50 struct nouveau_therm_trip_point trip[NOUVEAU_TEMP_FAN_TRIP_MAX];
51 u8 nr_fan_trip;
52 u8 linear_min_temp;
53 u8 linear_max_temp;
7d70e9c1
MP
54};
55
56enum nvbios_therm_domain {
57 NVBIOS_THERM_DOMAIN_CORE,
58 NVBIOS_THERM_DOMAIN_AMBIENT,
59};
60
61int
62nvbios_therm_sensor_parse(struct nouveau_bios *, enum nvbios_therm_domain,
63 struct nvbios_therm_sensor *);
64
65int
66nvbios_therm_fan_parse(struct nouveau_bios *, struct nvbios_therm_fan *);
67
68
69#endif