Skip to content

Commit 8a5b5d4

Browse files
committed
drm/amdgpu/pm: remove check for pp funcs in freq sysfs handlers
The dpm sensor function already does this for us. This fixes the freq*_input files with the new SMU implementation. Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 02316e9 commit 8a5b5d4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,11 +2077,6 @@ static ssize_t amdgpu_hwmon_show_sclk(struct device *dev,
20772077
(ddev->switch_power_state != DRM_SWITCH_POWER_ON))
20782078
return -EINVAL;
20792079

2080-
/* sanity check PP is enabled */
2081-
if (!(adev->powerplay.pp_funcs &&
2082-
adev->powerplay.pp_funcs->read_sensor))
2083-
return -EINVAL;
2084-
20852080
/* get the sclk */
20862081
r = amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_SCLK,
20872082
(void *)&sclk, &size);
@@ -2112,11 +2107,6 @@ static ssize_t amdgpu_hwmon_show_mclk(struct device *dev,
21122107
(ddev->switch_power_state != DRM_SWITCH_POWER_ON))
21132108
return -EINVAL;
21142109

2115-
/* sanity check PP is enabled */
2116-
if (!(adev->powerplay.pp_funcs &&
2117-
adev->powerplay.pp_funcs->read_sensor))
2118-
return -EINVAL;
2119-
21202110
/* get the sclk */
21212111
r = amdgpu_dpm_read_sensor(adev, AMDGPU_PP_SENSOR_GFX_MCLK,
21222112
(void *)&mclk, &size);

0 commit comments

Comments
 (0)