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>
This commit is contained in:
Ujwal Patel 2014-11-06 18:29:04 -08:00 committed by David Keitel
parent fecd461b57
commit 7541576401
3 changed files with 16 additions and 11 deletions

View file

@ -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;
}

View file

@ -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);

View file

@ -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;
}