* [PATCH] drm/amdgpu: add documentation on hwmon interfaces exposed (v2)
@ 2018-03-29 18:33 Alex Deucher
[not found] ` <20180329183328.20594-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2018-03-29 18:33 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Provide detail on the currently exposed hwmon interfaces
for temperature, power, voltage, and fan.
v2: add power cap documentation
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 38 ++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index e6e365852f11..c8a8c866e8c9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1109,6 +1109,44 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
return count;
}
+
+/**
+ * DOC: hwmon
+ *
+ * The amdgpu driver exposes the following sensor interfaces:
+ * - GPU temperature (via the on-die sensor)
+ * - GPU voltage
+ * - Northbridge voltage (APUs only)
+ * - GPU power
+ * - GPU fan
+ *
+ * hwmon interfaces for GPU temperature:
+ * - temp1_input: the on die GPU temperature in millidegrees Celsius
+ * - temp1_crit: temperature critical max value in millidegrees Celsius
+ * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius
+ *
+ * hwmon interfaces for GPU voltage:
+ * - in0_input: the voltage on the GPU in millivolts
+ * - in1_input: the voltage on the Northbridge in millivolts
+ *
+ * hwmon interfaces for GPU power:
+ * - power1_average: average power used by the GPU in microWatts
+ * - power1_cap_min: minimum cap supported in microWatts
+ * - power1_cap_max: maximum cap supported in microWatts
+ * - power1_cap: selected power cap in microWatts
+ *
+ * hwmon interfaces for GPU fan:
+ * - pwm1: pulse width modulation fan level (0-255)
+ * - 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
+ * - pwm1_min: pulse width modulation fan control minimum level (0)
+ * - pwm1_max: pulse width modulation fan control maximum level (255)
+ * - fan1_input: fan speed in RPM
+ *
+ */
+
static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0);
static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0);
static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1);
--
2.13.6
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: add documentation on hwmon interfaces exposed (v2)
[not found] ` <20180329183328.20594-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2018-04-02 7:09 ` Huang Rui
0 siblings, 0 replies; 2+ messages in thread
From: Huang Rui @ 2018-04-02 7:09 UTC (permalink / raw)
To: Alex Deucher; +Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, Mar 29, 2018 at 01:33:28PM -0500, Alex Deucher wrote:
> Provide detail on the currently exposed hwmon interfaces
> for temperature, power, voltage, and fan.
>
> v2: add power cap documentation
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
I think we add a comment to describe that we can use lm-sensors to prints
the power cap.
jenkins@jenkins-MS-7984:~$ sensors
amdgpu-pci-0300
Adapter: PCI adapter
vddgfx: +0.80 V
fan1: 791 RPM
temp1: +47.0°C (crit = +91.0°C, hyst = -273.1°C)
power1: 17.00 W (cap = 125.00 W)
Reviewed-by: Huang Rui <ray.huang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 38 ++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index e6e365852f11..c8a8c866e8c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -1109,6 +1109,44 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
> return count;
> }
>
> +
> +/**
> + * DOC: hwmon
> + *
> + * The amdgpu driver exposes the following sensor interfaces:
> + * - GPU temperature (via the on-die sensor)
> + * - GPU voltage
> + * - Northbridge voltage (APUs only)
> + * - GPU power
> + * - GPU fan
> + *
> + * hwmon interfaces for GPU temperature:
> + * - temp1_input: the on die GPU temperature in millidegrees Celsius
> + * - temp1_crit: temperature critical max value in millidegrees Celsius
> + * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius
> + *
> + * hwmon interfaces for GPU voltage:
> + * - in0_input: the voltage on the GPU in millivolts
> + * - in1_input: the voltage on the Northbridge in millivolts
> + *
> + * hwmon interfaces for GPU power:
> + * - power1_average: average power used by the GPU in microWatts
> + * - power1_cap_min: minimum cap supported in microWatts
> + * - power1_cap_max: maximum cap supported in microWatts
> + * - power1_cap: selected power cap in microWatts
> + *
> + * hwmon interfaces for GPU fan:
> + * - pwm1: pulse width modulation fan level (0-255)
> + * - 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
> + * - pwm1_min: pulse width modulation fan control minimum level (0)
> + * - pwm1_max: pulse width modulation fan control maximum level (255)
> + * - fan1_input: fan speed in RPM
> + *
> + */
> +
> static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, amdgpu_hwmon_show_temp, NULL, 0);
> static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 0);
> static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, amdgpu_hwmon_show_temp_thresh, NULL, 1);
> --
> 2.13.6
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-02 7:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 18:33 [PATCH] drm/amdgpu: add documentation on hwmon interfaces exposed (v2) Alex Deucher
[not found] ` <20180329183328.20594-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-04-02 7:09 ` Huang Rui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.