[PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting

Deucher, Alexander Alexander.Deucher at amd.com
Fri Aug 21 13:10:43 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Might want to add:
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1267
with that, the series is:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Quan, Evan <Evan.Quan at amd.com>
Sent: Friday, August 21, 2020 12:42 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Quan, Evan <Evan.Quan at amd.com>
Subject: [PATCH 1/3] drm/amd/pm: correct Vega10 swctf limit setting

Correct the Vega10 thermal swctf limit.

Change-Id: I220c18bcb0772bfb8cb674337bac6dccafbd7698
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
index 468bdd6f6697..ce9514c881ec 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
@@ -363,6 +363,9 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
 static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
                 struct PP_TemperatureRange *range)
 {
+       struct phm_ppt_v2_information *pp_table_info =
+               (struct phm_ppt_v2_information *)(hwmgr->pptable);
+       struct phm_tdp_table *tdp_table = pp_table_info->tdp_table;
         struct amdgpu_device *adev = hwmgr->adev;
         int low = VEGA10_THERMAL_MINIMUM_ALERT_TEMP *
                         PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
@@ -372,8 +375,8 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,

         if (low < range->min)
                 low = range->min;
-       if (high > range->max)
-               high = range->max;
+       if (high > tdp_table->usSoftwareShutdownTemp)
+               high = tdp_table->usSoftwareShutdownTemp;

         if (low > high)
                 return -EINVAL;
--
2.28.0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200821/0fdb12ee/attachment-0001.htm>


More information about the amd-gfx mailing list