[PATCH] drm/amdgpu: skip crit temperature values on APU
Wang, Kevin(Yang)
Kevin1.Wang at amd.com
Mon Jul 27 08:39:56 UTC 2020
[AMD Official Use Only - Internal Distribution Only]
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 Huang Rui <ray.huang at amd.com>
Sent: Monday, July 27, 2020 4:23 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Huang, Ray <Ray.Huang at amd.com>
Subject: [PATCH] drm/amdgpu: skip crit temperature values on APU
It doesn't expose PPTable descriptor on APU platform. So max/min
temperature values cannot be got from APU platform.
Signed-off-by: Huang Rui <ray.huang at amd.com>
---
This patch needs to backport to stable tree.
Thanks,
Ray
---
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 5f20cadee343..65ddf575ccbc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -3212,6 +3212,12 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
attr == &sensor_dev_attr_fan1_enable.dev_attr.attr))
return 0;
+ /* Skip crit temp on APU */
+ if ((adev->flags & AMD_IS_APU) && (adev->family >= AMDGPU_FAMILY_RV) &&
+ (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||
+ attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr))
+ return 0;
+
/* Skip limit attributes if DPM is not enabled */
if (!adev->pm.dpm_enabled &&
(attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||
--
2.25.1
_______________________________________________
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%7C73c50b729f024e67b23c08d832067d7c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637314350778753140&sdata=D3wb3uQxXJJkj%2Bb4XuBxrb2oYnTUq9jHQNiAe4ctSlU%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20200727/035acd50/attachment-0001.htm>
More information about the amd-gfx
mailing list