summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-07-02 15:38:53 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-15 12:44:32 -0400
commit0540ecedcba924b0e4c362c2698f66addfdf6558 (patch)
tree0f7e459ba786f1db6315d19aae3327d49f5edfe9 /drivers/gpu/drm/amd/powerplay/navi10_ppt.c
parente02e4d513e6e0ac69119799405f7d2b1ee4276ad (diff)
drm/amd/powerplay: sort the call flow on temperature ranges retrieving
This can help to maintain clear code layer. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
index 84a5724ac312..a4c20dd1aebe 100644
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
@@ -1864,6 +1864,8 @@ static int navi10_get_thermal_temperature_range(struct smu_context *smu,
if (!range)
return -EINVAL;
+ memcpy(range, &smu11_thermal_policy[0], sizeof(struct smu_temperature_range));
+
range->max = pptable->TedgeLimit *
SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
range->edge_emergency_max = (pptable->TedgeLimit + CTF_OFFSET_EDGE) *