Commit 35dab589 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

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: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d9b91b1e
...@@ -3467,6 +3467,12 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, ...@@ -3467,6 +3467,12 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) attr == &sensor_dev_attr_fan1_enable.dev_attr.attr))
return 0; return 0;
/* Skip crit temp on APU */
if ((adev->flags & AMD_IS_APU) && (adev->family >= AMDGPU_FAMILY_CZ) &&
(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 */ /* Skip limit attributes if DPM is not enabled */
if (!adev->pm.dpm_enabled && if (!adev->pm.dpm_enabled &&
(attr == &sensor_dev_attr_temp1_crit.dev_attr.attr || (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment