[PATCH] drm/amd/powerplay: sw ctf for arcturus

Wang, Kevin(Yang) Kevin1.Wang at amd.com
Thu Jan 9 02:38:38 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

fine for me.

Reviewed-by: Kevin Wang <kevin1.wang at amd.com>

Best Regards,
Kevin
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Kenneth Feng <kenneth.feng at amd.com>
Sent: Thursday, January 9, 2020 9:53 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Quan, Evan <Evan.Quan at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>
Subject: [PATCH] drm/amd/powerplay: sw ctf for arcturus

software ctf implementation on arcturs.
has been verified on the system by setting a fake software ctf
temperature limit like 40 degrees centigrade.
then the interrupt is triggered from ih ring and
the warning can be observed from dmesg.

Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
---
 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
index 50b317f..330d5f4 100644
--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
@@ -846,11 +846,13 @@ static int arcturus_get_thermal_temperature_range(struct smu_context *smu,
                                                 struct smu_temperature_range *range)
 {
         PPTable_t *pptable = smu->smu_table.driver_pptable;
+       struct smu_table_context *table_context = &smu->smu_table;
+       struct smu_11_0_powerplay_table *powerplay_table = table_context->power_play_table;

-       if (!range)
+       if (!range || !powerplay_table)
                 return -EINVAL;

-       range->max = pptable->TedgeLimit *
+       range->max = powerplay_table->software_shutdown_temp *
                 SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
         range->edge_emergency_max = (pptable->TedgeLimit + CTF_OFFSET_EDGE) *
                 SMU_TEMPERATURE_UNITS_PER_CENTIGRADES;
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CKevin1.Wang%40amd.com%7C4895e14d1c14407add8208d794a6ccdc%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637141316451781456&sdata=LJLHaR5O38HuI%2Bu0KZEkoCJcejrqNcZcUDV6w09pVyk%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200109/264d4f37/attachment.htm>


More information about the amd-gfx mailing list