diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2014-11-06 18:29:04 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:36:04 -0700 |
| commit | 7541576401fca25f97b015e8458997a6e51c49c6 (patch) | |
| tree | a3afae9fd836f79be1b399f3082f6916ef49ef6b | |
| parent | fecd461b5776041f1f1f918e433413fd48541ea6 (diff) | |
msm: mdss: ignore pipe allocation error due to priority limitation
Pipe allocation can fail if the priority of the pipes in pair do not
satisfy the requirement. But these failures are not fatal and will be
handled in the next round. So ignore log spitting if pipe allocation
failure is due to priority limitation.
CRs-Fixed: 746386
Change-Id: I8586197a9653daa430617367e1e8ec3851d2cfa0
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_overlay.c | 14 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 9 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_wb.c | 4 |
3 files changed, 16 insertions, 11 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index c1a2e29b221a..e234a3bc2820 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -682,7 +682,8 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, pipe = mdss_mdp_pipe_alloc(mixer, pipe_type, left_blend_pipe); /* RGB pipes can be used instead of DMA */ - if ((req->pipe_type == PIPE_TYPE_AUTO) && !pipe && + if (IS_ERR_OR_NULL(pipe) && + (req->pipe_type == PIPE_TYPE_AUTO) && (pipe_type == MDSS_MDP_PIPE_TYPE_DMA)) { pr_debug("giving RGB pipe for fb%d. flags:0x%x\n", mfd->index, req->flags); @@ -692,7 +693,8 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, } /* VIG pipes can also support RGB format */ - if ((req->pipe_type == PIPE_TYPE_AUTO) && !pipe && + if (IS_ERR_OR_NULL(pipe) && + (req->pipe_type == PIPE_TYPE_AUTO) && (pipe_type == MDSS_MDP_PIPE_TYPE_RGB)) { pr_debug("giving ViG pipe for fb%d. flags:0x%x\n", mfd->index, req->flags); @@ -701,9 +703,11 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd, left_blend_pipe); } - if (pipe == NULL) { - pr_err("error allocating pipe. flags=0x%x\n", - req->flags); + if (IS_ERR(pipe)) { + return PTR_ERR(pipe); + } else if (!pipe) { + pr_err("error allocating pipe. flags=0x%x req->pipe_type=%d pipe_type=%d\n", + req->flags, req->pipe_type, pipe_type); return -ENODEV; } diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index 7b32b1d8f6f0..da3329e9d133 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -846,9 +846,9 @@ static struct mdss_mdp_pipe *mdss_mdp_pipe_init(struct mdss_mdp_mixer *mixer, if (left_blend_pipe && pipe && pipe->priority <= left_blend_pipe->priority) { - pr_debug("priority limitation. l_pipe_prio:%d r_pipe_prio:%d\n", - left_blend_pipe->priority, pipe->priority); - return NULL; + pr_debug("priority limitation. l_pipe:%d r_pipe:%d\n", + left_blend_pipe->num, pipe->num); + return ERR_PTR(-EINVAL); } if (pipe && mdss_mdp_pipe_fetch_halt(pipe)) { @@ -914,8 +914,9 @@ struct mdss_mdp_pipe *mdss_mdp_pipe_alloc_dma(struct mdss_mdp_mixer *mixer) mdata = mixer->ctl->mdata; pipe = mdss_mdp_pipe_init(mixer, MDSS_MDP_PIPE_TYPE_DMA, mixer->num, NULL); - if (!pipe) { + if (IS_ERR_OR_NULL(pipe)) { pr_err("DMA pipes not available for mixer=%d\n", mixer->num); + pipe = NULL; } else if (pipe != &mdata->dma_pipes[mixer->num]) { pr_err("Requested DMA pnum=%d not available\n", mdata->dma_pipes[mixer->num].num); diff --git a/drivers/video/fbdev/msm/mdss_mdp_wb.c b/drivers/video/fbdev/msm/mdss_mdp_wb.c index 6efbf97518a5..07b3fb200ef5 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_wb.c +++ b/drivers/video/fbdev/msm/mdss_mdp_wb.c @@ -214,10 +214,10 @@ int mdss_mdp_wb_set_secure(struct msm_fb_data_type *mfd, int enable) if (!pipe) { pipe = mdss_mdp_pipe_alloc(mixer, MDSS_MDP_PIPE_TYPE_RGB, NULL); - if (!pipe) + if (IS_ERR_OR_NULL(pipe)) pipe = mdss_mdp_pipe_alloc(mixer, MDSS_MDP_PIPE_TYPE_VIG, NULL); - if (!pipe) { + if (IS_ERR_OR_NULL(pipe)) { pr_err("Unable to get pipe to set secure session\n"); return -ENOMEM; } |
