Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18f228f0 authored by Ujwal Patel's avatar Ujwal Patel
Browse files

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: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent f8fa637b
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -676,7 +676,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);
@@ -686,7 +687,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);
@@ -695,9 +697,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;
		}

+5 −4
Original line number Diff line number Diff line
@@ -850,9 +850,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)) {
@@ -918,8 +918,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);
+2 −2
Original line number Diff line number Diff line
@@ -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;
		}