drm/msm/sde: Change error code type when crtc is not attached
Change error code to EPERM when crtc is not attached. This is to
distinguish from EINVAL for userspace to take different approach.
Change-Id: I47da4cd8be9b47317b47fbcaf3e19121ec19ebf1
Signed-off-by: Xu Yang <yangxu@codeaurora.org>
diff --git a/drivers/gpu/drm/msm/sde/sde_color_processing.c b/drivers/gpu/drm/msm/sde/sde_color_processing.c
index 2c5b7ea..a1b7b2a 100644
--- a/drivers/gpu/drm/msm/sde/sde_color_processing.c
+++ b/drivers/gpu/drm/msm/sde/sde_color_processing.c
@@ -1028,7 +1028,7 @@
sde_crtc->num_mixers > ARRAY_SIZE(sde_crtc->mixers)) {
DRM_ERROR("Invalid mixer config act cnt %d max cnt %ld\n",
sde_crtc->num_mixers, ARRAY_SIZE(sde_crtc->mixers));
- ret = -EINVAL;
+ ret = -EPERM;
goto exit;
}
@@ -1896,7 +1896,7 @@
if (!hw_dspp) {
DRM_ERROR("invalid dspp\n");
- ret = -EINVAL;
+ ret = -EPERM;
goto exit;
}