diff options
author | Evan Quan <evan.quan@amd.com> | 2020-06-09 13:15:29 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-07-10 17:42:03 -0400 |
commit | e0f9e936403a4fa12a9808e84607a06695f6b21e (patch) | |
tree | d125fcfabf4b965e2c6d323267ea8f739a592d99 /drivers/gpu/drm/amd/powerplay/navi10_ppt.c | |
parent | 5e6dc8feae9710b60ede09440ffd399499b75af3 (diff) | |
download | linux-e0f9e936403a4fa12a9808e84607a06695f6b21e.tar.bz2 |
drm/amd/powerplay: unshare the code for retrieving current clock frequency
By moving them into asic specific file. Since they are really ASIC
specific.
Signed-off-by: Evan Quan <evan.quan@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/powerplay/navi10_ppt.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 87f110b16e55..3dab6f0e9578 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -1697,6 +1697,16 @@ static int navi10_read_sensor(struct smu_context *smu, ret = navi10_thermal_get_temperature(smu, sensor, (uint32_t *)data); *size = 4; break; + case AMDGPU_PP_SENSOR_GFX_MCLK: + ret = navi10_get_current_clk_freq_by_table(smu, SMU_UCLK, (uint32_t *)data); + *(uint32_t *)data *= 100; + *size = 4; + break; + case AMDGPU_PP_SENSOR_GFX_SCLK: + ret = navi10_get_current_clk_freq_by_table(smu, SMU_GFXCLK, (uint32_t *)data); + *(uint32_t *)data *= 100; + *size = 4; + break; default: ret = smu_v11_0_read_sensor(smu, sensor, data, size); } |