Commit dc85db25 authored by Alex Deucher's avatar Alex Deucher

drm/doc: Add amdgpu hwmon/power documentation (v2)

Document the hwmon and power control interfaces exposed
by the amdgpu driver.

v2: use section rather than chapter for now
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c8c5e569
...@@ -61,3 +61,56 @@ Interrupt Handling ...@@ -61,3 +61,56 @@ Interrupt Handling
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
:internal: :internal:
GPU Power/Thermal Controls and Monitoring
=========================================
This section covers hwmon and power/thermal controls.
HWMON Interfaces
----------------
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: hwmon
GPU sysfs Power State Interfaces
--------------------------------
GPU power controls are exposed via sysfs files.
power_dpm_state
~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: power_dpm_state
power_dpm_force_performance_level
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: power_dpm_force_performance_level
pp_table
~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: pp_table
pp_od_clk_voltage
~~~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: pp_od_clk_voltage
pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_pcie
pp_power_profile_mode
~~~~~~~~~~~~~~~~~~~~~
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
:doc: pp_power_profile_mode
...@@ -80,12 +80,15 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev) ...@@ -80,12 +80,15 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
/** /**
* DOC: power_dpm_state * DOC: power_dpm_state
* *
* This is a legacy interface and is only provided for backwards compatibility. * The power_dpm_state file is a legacy interface and is only provided for
* The amdgpu driver provides a sysfs API for adjusting certain power * backwards compatibility. The amdgpu driver provides a sysfs API for adjusting
* related parameters. The file power_dpm_state is used for this. * certain power related parameters. The file power_dpm_state is used for this.
* It accepts the following arguments: * It accepts the following arguments:
*
* - battery * - battery
*
* - balanced * - balanced
*
* - performance * - performance
* *
* battery * battery
...@@ -169,14 +172,21 @@ static ssize_t amdgpu_set_dpm_state(struct device *dev, ...@@ -169,14 +172,21 @@ static ssize_t amdgpu_set_dpm_state(struct device *dev,
* The amdgpu driver provides a sysfs API for adjusting certain power * The amdgpu driver provides a sysfs API for adjusting certain power
* related parameters. The file power_dpm_force_performance_level is * related parameters. The file power_dpm_force_performance_level is
* used for this. It accepts the following arguments: * used for this. It accepts the following arguments:
*
* - auto * - auto
*
* - low * - low
*
* - high * - high
*
* - manual * - manual
* - GPU fan *
* - profile_standard * - profile_standard
*
* - profile_min_sclk * - profile_min_sclk
*
* - profile_min_mclk * - profile_min_mclk
*
* - profile_peak * - profile_peak
* *
* auto * auto
...@@ -463,8 +473,11 @@ static ssize_t amdgpu_set_pp_table(struct device *dev, ...@@ -463,8 +473,11 @@ static ssize_t amdgpu_set_pp_table(struct device *dev,
* this. * this.
* *
* Reading the file will display: * Reading the file will display:
*
* - a list of engine clock levels and voltages labeled OD_SCLK * - a list of engine clock levels and voltages labeled OD_SCLK
*
* - a list of memory clock levels and voltages labeled OD_MCLK * - a list of memory clock levels and voltages labeled OD_MCLK
*
* - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE * - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE
* *
* To manually adjust these settings, first select manual using * To manually adjust these settings, first select manual using
...@@ -1285,35 +1298,51 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev, ...@@ -1285,35 +1298,51 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
* DOC: hwmon * DOC: hwmon
* *
* The amdgpu driver exposes the following sensor interfaces: * The amdgpu driver exposes the following sensor interfaces:
*
* - GPU temperature (via the on-die sensor) * - GPU temperature (via the on-die sensor)
*
* - GPU voltage * - GPU voltage
*
* - Northbridge voltage (APUs only) * - Northbridge voltage (APUs only)
*
* - GPU power * - GPU power
*
* - GPU fan * - GPU fan
* *
* hwmon interfaces for GPU temperature: * hwmon interfaces for GPU temperature:
*
* - temp1_input: the on die GPU temperature in millidegrees Celsius * - temp1_input: the on die GPU temperature in millidegrees Celsius
*
* - temp1_crit: temperature critical max value in millidegrees Celsius * - temp1_crit: temperature critical max value in millidegrees Celsius
*
* - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius
* *
* hwmon interfaces for GPU voltage: * hwmon interfaces for GPU voltage:
*
* - in0_input: the voltage on the GPU in millivolts * - in0_input: the voltage on the GPU in millivolts
*
* - in1_input: the voltage on the Northbridge in millivolts * - in1_input: the voltage on the Northbridge in millivolts
* *
* hwmon interfaces for GPU power: * hwmon interfaces for GPU power:
*
* - power1_average: average power used by the GPU in microWatts * - power1_average: average power used by the GPU in microWatts
*
* - power1_cap_min: minimum cap supported in microWatts * - power1_cap_min: minimum cap supported in microWatts
*
* - power1_cap_max: maximum cap supported in microWatts * - power1_cap_max: maximum cap supported in microWatts
*
* - power1_cap: selected power cap in microWatts * - power1_cap: selected power cap in microWatts
* *
* hwmon interfaces for GPU fan: * hwmon interfaces for GPU fan:
*
* - pwm1: pulse width modulation fan level (0-255) * - pwm1: pulse width modulation fan level (0-255)
* - pwm1_enable: pulse width modulation fan control method *
* 0: no fan speed control * - pwm1_enable: pulse width modulation fan control method (0: no fan speed control, 1: manual fan speed control using pwm interface, 2: automatic fan speed control)
* 1: manual fan speed control using pwm interface *
* 2: automatic fan speed control
* - pwm1_min: pulse width modulation fan control minimum level (0) * - pwm1_min: pulse width modulation fan control minimum level (0)
*
* - pwm1_max: pulse width modulation fan control maximum level (255) * - pwm1_max: pulse width modulation fan control maximum level (255)
*
* - fan1_input: fan speed in RPM * - fan1_input: fan speed in RPM
* *
* You can use hwmon tools like sensors to view this information on your system. * You can use hwmon tools like sensors to view this information on your system.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment