Skip to content

Commit a676a97

Browse files
huangruialexdeucher
authored andcommitted
drm/amdgpu: skip crit temperature values on APU (v2)
It doesn't expose PPTable descriptor on APU platform. So max/min temperature values cannot be got from APU platform. v2: Stoney needs to skip crit temperature as well. Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Kevin Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 76d5ef4 commit a676a97

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3212,6 +3212,12 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
32123212
attr == &sensor_dev_attr_fan1_enable.dev_attr.attr))
32133213
return 0;
32143214

3215+
/* Skip crit temp on APU */
3216+
if ((adev->flags & AMD_IS_APU) && (adev->family >= AMDGPU_FAMILY_CZ) &&
3217+
(attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||
3218+
attr == &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr))
3219+
return 0;
3220+
32153221
/* Skip limit attributes if DPM is not enabled */
32163222
if (!adev->pm.dpm_enabled &&
32173223
(attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||

0 commit comments

Comments
 (0)