aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
diff options
context:
space:
mode:
authorShirish S <shirish.s@amd.com>2021-02-25 21:07:21 +0530
committerAlex Deucher <alexander.deucher@amd.com>2021-02-26 17:23:49 -0500
commite0cd93b7e307cf6920fbc699df04d073c9004c22 (patch)
treec3f8c0a4adeeedc796f9e7c6aaad557319a5bbd2 /drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
parente9995d4a3026b104724700397ee9db4cd75445dc (diff)
downloadlinux-e0cd93b7e307cf6920fbc699df04d073c9004c22.tar.gz
amdgpu/pm: read_sensor() report failure apporpriately
report -ENOTSUPP instead of -EINVAL, so that if userspace fails to read sensor data can figure it out the failure correctly. Signed-off-by: Shirish S <shirish.s@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/powerplay/si_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/si_dpm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
index 62291358fb1c..26a5321e621b 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c
@@ -8014,7 +8014,7 @@ static int si_dpm_read_sensor(void *handle, int idx,
*size = 4;
return 0;
default:
- return -EINVAL;
+ return -EOPNOTSUPP;
}
}