GNU Linux-libre 6.9.1-gnu
[releases.git] / Documentation / gpu / amdgpu / thermal.rst
1 ===========================================
2  GPU Power/Thermal Controls and Monitoring
3 ===========================================
4
5 HWMON Interfaces
6 ================
7
8 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
9    :doc: hwmon
10
11 GPU sysfs Power State Interfaces
12 ================================
13
14 GPU power controls are exposed via sysfs files.
15
16 power_dpm_state
17 ---------------
18
19 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
20    :doc: power_dpm_state
21
22 power_dpm_force_performance_level
23 ---------------------------------
24
25 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
26    :doc: power_dpm_force_performance_level
27
28 pp_table
29 --------
30
31 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
32    :doc: pp_table
33
34 pp_od_clk_voltage
35 -----------------
36
37 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
38    :doc: pp_od_clk_voltage
39
40 pp_dpm_*
41 --------
42
43 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
44    :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
45
46 pp_power_profile_mode
47 ---------------------
48
49 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
50    :doc: pp_power_profile_mode
51
52 \*_busy_percent
53 ---------------
54
55 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
56    :doc: gpu_busy_percent
57
58 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
59    :doc: mem_busy_percent
60
61 gpu_metrics
62 -----------
63
64 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
65    :doc: gpu_metrics
66
67 fan_curve
68 ---------
69
70 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
71    :doc: fan_curve
72
73 acoustic_limit_rpm_threshold
74 ----------------------------
75
76 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
77    :doc: acoustic_limit_rpm_threshold
78
79 acoustic_target_rpm_threshold
80 -----------------------------
81
82 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
83    :doc: acoustic_target_rpm_threshold
84
85 fan_target_temperature
86 ----------------------
87
88 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
89    :doc: fan_target_temperature
90
91 fan_minimum_pwm
92 ---------------
93
94 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
95    :doc: fan_minimum_pwm
96
97 GFXOFF
98 ======
99
100 GFXOFF is a feature found in most recent GPUs that saves power at runtime. The
101 card's RLC (RunList Controller) firmware powers off the gfx engine
102 dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
103 default on supported GPUs.
104
105 Userspace can interact with GFXOFF through a debugfs interface (all values in
106 `uint32_t`, unless otherwise noted):
107
108 ``amdgpu_gfxoff``
109 -----------------
110
111 Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
112
113   $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
114   01
115
116 - Write 0 to disable it, and 1 to enable it.
117 - Read 0 means it's disabled, 1 it's enabled.
118
119 If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
120 needed. Disabled means that it will never enter GFXOFF mode.
121
122 ``amdgpu_gfxoff_status``
123 ------------------------
124
125 Read it to check current GFXOFF's status of a GPU::
126
127   $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
128   02
129
130 - 0: GPU is in GFXOFF state, the gfx engine is powered down.
131 - 1: Transition out of GFXOFF state
132 - 2: Not in GFXOFF state
133 - 3: Transition into GFXOFF state
134
135 If GFXOFF is enabled, the value will be transitioning around [0, 3], always
136 getting into 0 when possible. When it's disabled, it's always at 2. Returns
137 ``-EINVAL`` if it's not supported.
138
139 ``amdgpu_gfxoff_count``
140 -----------------------
141
142 Read it to get the total GFXOFF entry count at the time of query since system
143 power-up. The value is an `uint64_t` type, however, due to firmware limitations,
144 it can currently overflow as an `uint32_t`. *Only supported in vangogh*
145
146 ``amdgpu_gfxoff_residency``
147 ---------------------------
148
149 Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to
150 get average GFXOFF residency % multiplied by 100 during the last logging
151 interval. E.g. a value of 7854 means 78.54% of the time in the last logging
152 interval the GPU was in GFXOFF mode. *Only supported in vangogh*