From 28587990fdf68af8dfd3068ce0d46f09cb8caeea Mon Sep 17 00:00:00 2001 From: Jeykumar Sankaran Date: Fri, 10 Apr 2015 17:25:04 -0700 Subject: msm: mdss: Return EBADSLT on pipe failures due to priority Return EBADSLT error for pipe allocation failures due to priority mismatch. This isolation helps the client to identify and allocate pipes to layers efficiently. Change-Id: I601bd4880ade8313be3b870ca4551b40ebb7d00b Signed-off-by: Jeykumar Sankaran --- drivers/video/fbdev/msm/mdss_mdp_overlay.c | 2 +- drivers/video/fbdev/msm/mdss_mdp_pipe.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index afcf49908ffe..dc9329ca2086 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -782,7 +782,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, if (pipe->priority <= left_blend_pipe->priority) { pr_err("priority limitation. left:%d right%d\n", left_blend_pipe->priority, pipe->priority); - ret = -EPERM; + ret = -EBADSLT; goto exit_fail; } else { pr_debug("pipe%d is a right_pipe\n", pipe->num); diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index cefc13dec875..51cbdafe0835 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -1025,7 +1025,8 @@ static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer, if (off >= npipes) { pr_warn("priority limitation. l_pipe:%d. no low priority %d pipe type available.\n", left_blend_pipe->num, type); - return NULL; + pipe = ERR_PTR(-EBADSLT); + return pipe; } } -- cgit v1.2.3