diff options
author | Likun Gao <Likun.Gao@amd.com> | 2019-01-28 06:12:10 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 16:04:01 -0400 |
commit | c5bee44baa3c60c3d283c3348ef1b5bf1e8e2427 (patch) | |
tree | 6c9bf404d850f60fd2f0dbc61303d30095990dfe /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | |
parent | bc0fcffd36baa1cbbf2a6e951e4f1acad3aa8c90 (diff) |
drm/amd/powerplay: add function to get sclk and mclk
Add function to get sclk and mclk for smu11.
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-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.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c index 344967df3137..523b8ab6b04e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | |||
@@ -904,3 +904,19 @@ amdgpu_get_vce_clock_state(void *handle, u32 idx) | |||
904 | 904 | ||
905 | return NULL; | 905 | return NULL; |
906 | } | 906 | } |
907 | |||
908 | int amdgpu_dpm_get_sclk(struct amdgpu_device *adev, bool low) | ||
909 | { | ||
910 | if (is_support_sw_smu(adev)) | ||
911 | return smu_get_sclk(&adev->smu, low); | ||
912 | else | ||
913 | return (adev)->powerplay.pp_funcs->get_sclk((adev)->powerplay.pp_handle, (low)); | ||
914 | } | ||
915 | |||
916 | int amdgpu_dpm_get_mclk(struct amdgpu_device *adev, bool low) | ||
917 | { | ||
918 | if (is_support_sw_smu(adev)) | ||
919 | return smu_get_mclk(&adev->smu, low); | ||
920 | else | ||
921 | return (adev)->powerplay.pp_funcs->get_mclk((adev)->powerplay.pp_handle, (low)); | ||
922 | } | ||