xref: /OK3568_Linux_fs/kernel/Documentation/driver-api/thermal/nouveau_thermal.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun=====================
2*4882a593SmuzhiyunKernel driver nouveau
3*4882a593Smuzhiyun=====================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunSupported chips:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun* NV43+
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunAuthors: Martin Peres (mupuf) <martin.peres@free.fr>
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDescription
12*4882a593Smuzhiyun-----------
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunThis driver allows to read the GPU core temperature, drive the GPU fan and
15*4882a593Smuzhiyunset temperature alarms.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunCurrently, due to the absence of in-kernel API to access HWMON drivers, Nouveau
18*4882a593Smuzhiyuncannot access any of the i2c external monitoring chips it may find. If you
19*4882a593Smuzhiyunhave one of those, temperature and/or fan management through Nouveau's HWMON
20*4882a593Smuzhiyuninterface is likely not to work. This document may then not cover your situation
21*4882a593Smuzhiyunentirely.
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunTemperature management
24*4882a593Smuzhiyun----------------------
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunTemperature is exposed under as a read-only HWMON attribute temp1_input.
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunIn order to protect the GPU from overheating, Nouveau supports 4 configurable
29*4882a593Smuzhiyuntemperature thresholds:
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun * Fan_boost:
32*4882a593Smuzhiyun	Fan speed is set to 100% when reaching this temperature;
33*4882a593Smuzhiyun * Downclock:
34*4882a593Smuzhiyun	The GPU will be downclocked to reduce its power dissipation;
35*4882a593Smuzhiyun * Critical:
36*4882a593Smuzhiyun	The GPU is put on hold to further lower power dissipation;
37*4882a593Smuzhiyun * Shutdown:
38*4882a593Smuzhiyun	Shut the computer down to protect your GPU.
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunWARNING:
41*4882a593Smuzhiyun	Some of these thresholds may not be used by Nouveau depending
42*4882a593Smuzhiyun	on your chipset.
43*4882a593Smuzhiyun
44*4882a593SmuzhiyunThe default value for these thresholds comes from the GPU's vbios. These
45*4882a593Smuzhiyunthresholds can be configured thanks to the following HWMON attributes:
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun * Fan_boost: temp1_auto_point1_temp and temp1_auto_point1_temp_hyst;
48*4882a593Smuzhiyun * Downclock: temp1_max and temp1_max_hyst;
49*4882a593Smuzhiyun * Critical: temp1_crit and temp1_crit_hyst;
50*4882a593Smuzhiyun * Shutdown: temp1_emergency and temp1_emergency_hyst.
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunNOTE: Remember that the values are stored as milli degrees Celsius. Don't forget
53*4882a593Smuzhiyunto multiply!
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunFan management
56*4882a593Smuzhiyun--------------
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunNot all cards have a drivable fan. If you do, then the following HWMON
59*4882a593Smuzhiyunattributes should be available:
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun * pwm1_enable:
62*4882a593Smuzhiyun	Current fan management mode (NONE, MANUAL or AUTO);
63*4882a593Smuzhiyun * pwm1:
64*4882a593Smuzhiyun	Current PWM value (power percentage);
65*4882a593Smuzhiyun * pwm1_min:
66*4882a593Smuzhiyun	The minimum PWM speed allowed;
67*4882a593Smuzhiyun * pwm1_max:
68*4882a593Smuzhiyun	The maximum PWM speed allowed (bypassed when hitting Fan_boost);
69*4882a593Smuzhiyun
70*4882a593SmuzhiyunYou may also have the following attribute:
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun * fan1_input:
73*4882a593Smuzhiyun	Speed in RPM of your fan.
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunYour fan can be driven in different modes:
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun * 0: The fan is left untouched;
78*4882a593Smuzhiyun * 1: The fan can be driven in manual (use pwm1 to change the speed);
79*4882a593Smuzhiyun * 2; The fan is driven automatically depending on the temperature.
80*4882a593Smuzhiyun
81*4882a593SmuzhiyunNOTE:
82*4882a593Smuzhiyun  Be sure to use the manual mode if you want to drive the fan speed manually
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunNOTE2:
85*4882a593Smuzhiyun  When operating in manual mode outside the vbios-defined
86*4882a593Smuzhiyun  [PWM_min, PWM_max] range, the reported fan speed (RPM) may not be accurate
87*4882a593Smuzhiyun  depending on your hardware.
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunBug reports
90*4882a593Smuzhiyun-----------
91*4882a593Smuzhiyun
92*4882a593SmuzhiyunThermal management on Nouveau is new and may not work on all cards. If you have
93*4882a593Smuzhiyuninquiries, please ping mupuf on IRC (#nouveau, freenode).
94*4882a593Smuzhiyun
95*4882a593SmuzhiyunBug reports should be filled on Freedesktop's bug tracker. Please follow
96*4882a593Smuzhiyunhttps://nouveau.freedesktop.org/wiki/Bugs
97