diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index e6e365852f11..e5f60fc31516 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -1109,6 +1109,46 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev, | |||
1109 | return count; | 1109 | return count; |
1110 | } | 1110 | } |
1111 | 1111 | ||
1112 | |||
1113 | /** | ||
1114 | * DOC: hwmon | ||
1115 | * | ||
1116 | * The amdgpu driver exposes the following sensor interfaces: | ||
1117 | * - GPU temperature (via the on-die sensor) | ||
1118 | * - GPU voltage | ||
1119 | * - Northbridge voltage (APUs only) | ||
1120 | * - GPU power | ||
1121 | * - GPU fan | ||
1122 | * | ||
1123 | * hwmon interfaces for GPU temperature: | ||
1124 | * - temp1_input: the on die GPU temperature in millidegrees Celsius | ||
1125 | * - temp1_crit: temperature critical max value in millidegrees Celsius | ||
1126 | * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius | ||
1127 | * | ||
1128 | * hwmon interfaces for GPU voltage: | ||
1129 | * - in0_input: the voltage on the GPU in millivolts | ||
1130 | * - in1_input: the voltage on the Northbridge in millivolts | ||
1131 | * | ||
1132 | * hwmon interfaces for GPU power: | ||
1133 | * - power1_average: average power used by the GPU in microWatts | ||
1134 | * - power1_cap_min: minimum cap supported in microWatts | ||
1135 | * - power1_cap_max: maximum cap supported in microWatts | ||
1136 | * - power1_cap: selected power cap in microWatts | ||
1137 | * | ||
1138 | * hwmon interfaces for GPU fan: | ||
1139 | * - pwm1: pulse width modulation fan level (0-255) | ||
1140 | * - pwm1_enable: pulse width modulation fan control method | ||
1141 | * 0: no fan speed control | ||
1142 | * 1: manual fan speed control using pwm interface | ||
1143 | * 2: automatic fan speed control | ||
1144 | * - pwm1_min: pulse width modulation fan control minimum level (0) | ||
1145 | * - pwm1_max: pulse width modulation fan control maximum level (255) | ||
1146 | * - fan1_input: fan speed in RPM | ||
1147 | * | ||
1148 | * You can use hwmon tools like sensors to view this information on your system. | ||
1149 | * | ||
1150 | */ | ||
1151 | |||
1112 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0); | 1152 | static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0); |
1113 | static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0); | 1153 | static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0); |
1114 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1); | 1154 | static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1); |