Skip to content

Commit e53dcef

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amd/pm: Return -EOPNOTSUPP when can't read power limit
So that hwmon_attributes_visible() will see that the power2_cap attributes should not be visible on GPUs that don't support the get_power_limit() function. This fixes an error when running the "sensors" command on SI. Fixes: 12c958d ("drm/amd/pm: Expose ppt1 limit for gc_v9_5_0") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 966d70f commit e53dcef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/pm/amdgpu_dpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ int amdgpu_dpm_get_power_limit(struct amdgpu_device *adev,
15691569
int ret = 0;
15701570

15711571
if (!pp_funcs->get_power_limit)
1572-
return -ENODATA;
1572+
return -EOPNOTSUPP;
15731573

15741574
mutex_lock(&adev->pm.mutex);
15751575
ret = pp_funcs->get_power_limit(adev->powerplay.pp_handle,

0 commit comments

Comments
 (0)