aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2017-02-09 14:29:01 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:52:59 -0400
commit9f8df7d71e382c9afa808a08c11a990e90ac7df4 (patch)
tree9002abe9daf71a55c7bcde6022f4ed6b67d657e6 /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
parentdrm/amdgpu: implement PRT for GFX8 v2 (diff)
downloadlinux-dev-9f8df7d71e382c9afa808a08c11a990e90ac7df4.tar.xz
linux-dev-9f8df7d71e382c9afa808a08c11a990e90ac7df4.zip
drm/amd/amdgpu: Update read_sensor calls to have size parameter (v3)
This update allows sensors to return more than 1 value and indicates to the caller how many bytes are written. The debugfs interface has been updated to handle reading all of the values. Simply seek to the enum value (multiplied by 4) and then read as many bytes as the sensor provides. (v2): Don't set size to 4 before reading GPU_POWER (v3): agd: rebase Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
index 5f09893c9674..5dd9daae9eef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
@@ -290,9 +290,9 @@ struct amdgpu_dpm_funcs {
#define amdgpu_dpm_vblank_too_short(adev) (adev)->pm.funcs->vblank_too_short((adev))
#define amdgpu_dpm_enable_bapm(adev, e) (adev)->pm.funcs->enable_bapm((adev), (e))
-#define amdgpu_dpm_read_sensor(adev, idx, value) \
+#define amdgpu_dpm_read_sensor(adev, idx, value, size) \
((adev)->pp_enabled ? \
- (adev)->powerplay.pp_funcs->read_sensor(adev->powerplay.pp_handle, (idx), (value)) : \
+ (adev)->powerplay.pp_funcs->read_sensor(adev->powerplay.pp_handle, (idx), (value), (size)) : \
-EINVAL)
#define amdgpu_dpm_get_temperature(adev) \