[PATCH] drm/amd/pm: avoid false alarm due to confusing softwareshutdowntemp setting

Deucher, Alexander Alexander.Deucher at amd.com
Wed Aug 26 12:53:12 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Quan, Evan <Evan.Quan at amd.com>
Sent: Wednesday, August 26, 2020 3:45 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] drm/amd/pm: avoid false alarm due to confusing softwareshutdowntemp setting

Normally softwareshutdowntemp should be greater than Thotspotlimit.
However, on some VEGA10 ASIC, the softwareshutdowntemp is 91C while
Thotspotlimit is 105C. This seems not right and may trigger some
false alarms.

Change-Id: I940cc6e450eebccd93ccdc3428187f6b7c09dcda
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
 .../drm/amd/pm/powerplay/hwmgr/vega10_thermal.c    | 14 ++++++++++++--
 1 file changed, 12 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 d572ba4ec9b1..952cd3d7240e 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c
@@ -374,8 +374,18 @@ static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
         /* compare them in unit celsius degree */
         if (low < range->min / PP_TEMPERATURE_UNITS_PER_CENTIGRADES)
                 low = range->min / PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
-       if (high > tdp_table->usSoftwareShutdownTemp)
-               high = tdp_table->usSoftwareShutdownTemp;
+
+       /*
+        * As a common sense, usSoftwareShutdownTemp should be bigger
+        * than ThotspotLimit. For any invalid usSoftwareShutdownTemp,
+        * we will just use the max possible setting VEGA10_THERMAL_MAXIMUM_ALERT_TEMP
+        * to avoid false alarms.
+        */
+       if ((tdp_table->usSoftwareShutdownTemp >
+            range->hotspot_crit_max / PP_TEMPERATURE_UNITS_PER_CENTIGRADES)) {
+               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/20200826/2fea6503/attachment.htm>


More information about the amd-gfx mailing list