diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2016-10-29 23:28:59 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-11-11 10:20:56 -0500 |
commit | 81c1514bf8db9aee71bc6e610a62d64a865e06a4 (patch) | |
tree | 18b04c6517c9bc96cc5d76de500d52953d83e5fd /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | |
parent | 72a16a9d59ee0de87d9899959978b8e8f6da8438 (diff) | |
download | talos-obmc-linux-81c1514bf8db9aee71bc6e610a62d64a865e06a4.tar.gz talos-obmc-linux-81c1514bf8db9aee71bc6e610a62d64a865e06a4.zip |
drm/amd/amdgpu: expose fan rpm though hwmon
Only for cards that are supported by powerplay.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h index bd85e35998e7..e45bd052157b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h @@ -317,6 +317,11 @@ struct amdgpu_dpm_funcs { (adev)->powerplay.pp_funcs->get_fan_speed_percent((adev)->powerplay.pp_handle, (s)) : \ (adev)->pm.funcs->get_fan_speed_percent((adev), (s))) +#define amdgpu_dpm_get_fan_speed_rpm(adev, s) \ + ((adev)->pp_enabled ? \ + (adev)->powerplay.pp_funcs->get_fan_speed_rpm((adev)->powerplay.pp_handle, (s)) : \ + -EINVAL) + #define amdgpu_dpm_get_sclk(adev, l) \ ((adev)->pp_enabled ? \ (adev)->powerplay.pp_funcs->get_sclk((adev)->powerplay.pp_handle, (l)) : \ |