Skip to contentSkip to conversation

drm/amdgpu: skip crit temperature values on APU

PATCH In review Huang Rui 2 participants 2 messages Jul 27, 2020

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 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.

---

This patch needs to backport to stable tree.

Thanks,
Ray

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +6 -0
index 5f20cadee343..65ddf575ccbc 100644
@@ -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 ||
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Best Regards,
Kevin
________________________________
From: amd-gfx <[email protected]> on behalf of Huang Rui <[email protected]>
Sent: Monday, July 27, 2020 4:23 PM
To: [email protected] <[email protected]>
Cc: Huang, Ray <[email protected]>
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.

---

This patch needs to backport to stable tree.

Thanks,
Ray

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +6 -0
index 5f20cadee343..65ddf575ccbc 100644
@@ -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
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CKevin1.Wang%40amd.com%7C73c50b729f024e67b23c08d832067d7c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637314350778753140&amp;sdata=D3wb3uQxXJJkj%2Bb4XuBxrb2oYnTUq9jHQNiAe4ctSlU%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx