Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Huang Rui and committed by
Alex Deucher
a676a976 76d5ef4f

+6
+6
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
··· 3212 3212 attr == &sensor_dev_attr_fan1_enable.dev_attr.attr)) 3213 3213 return 0; 3214 3214 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 + 3215 3221 /* Skip limit attributes if DPM is not enabled */ 3216 3222 if (!adev->pm.dpm_enabled && 3217 3223 (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||