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

Commit 22e7695a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Allocate DMA pipe for pan display path"

parents a805bce8 87eca82b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1842,7 +1842,7 @@ int mdss_mdp_calib_mode(struct msm_fb_data_type *mfd,
int mdss_mdp_pipe_handoff(struct mdss_mdp_pipe *pipe);
int mdss_mdp_smp_handoff(struct mdss_data_type *mdata);
struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer,
	u32 type, struct mdss_mdp_pipe *left_blend_pipe);
	u32 off, u32 type, struct mdss_mdp_pipe *left_blend_pipe);
struct mdss_mdp_pipe *mdss_mdp_pipe_get(u32 ndx,
	enum mdss_mdp_pipe_rect rect_num);
struct mdss_mdp_pipe *mdss_mdp_pipe_search(struct mdss_data_type *mdata,
+19 −7
Original line number Diff line number Diff line
@@ -609,6 +609,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	bool is_vig_needed = false;
	u32 left_lm_w = left_lm_w_from_mfd(mfd);
	u32 flags = 0;
	u32 off = 0;

	if (mdp5_data->ctl == NULL)
		return -ENODEV;
@@ -692,18 +693,29 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
			break;
		case PIPE_TYPE_AUTO:
		default:
			if (req->flags & MDP_OV_PIPE_FORCE_DMA)
			if (req->flags & MDP_OV_PIPE_FORCE_DMA) {
				pipe_type = MDSS_MDP_PIPE_TYPE_DMA;
			else if (fmt->is_yuv ||
				/*
				 * For paths using legacy API's for pipe
				 * allocation, use offset of 2 for allocating
				 * right pipe for pipe type DMA. This is
				 * because from SDM 3.x.x. onwards one DMA
				 * pipe has two instances for multirect.
				 */
				off = (mixer_mux == MDSS_MDP_MIXER_MUX_RIGHT)
						? 2 : 0;
			} else if (fmt->is_yuv ||
				(req->flags & MDP_OV_PIPE_SHARE) ||
				is_vig_needed)
				is_vig_needed) {
				pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
			else
			} else {
				pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
			}
			break;
		}

		pipe = mdss_mdp_pipe_alloc(mixer, pipe_type, left_blend_pipe);
		pipe = mdss_mdp_pipe_alloc(mixer, off,
				pipe_type, left_blend_pipe);

		/* RGB pipes can be used instead of DMA */
		if (IS_ERR_OR_NULL(pipe) &&
@@ -712,7 +724,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
			pr_debug("giving RGB pipe for fb%d. flags:0x%x\n",
				mfd->index, req->flags);
			pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
			pipe = mdss_mdp_pipe_alloc(mixer, pipe_type,
			pipe = mdss_mdp_pipe_alloc(mixer, off, pipe_type,
				left_blend_pipe);
		}

@@ -723,7 +735,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
			pr_debug("giving ViG pipe for fb%d. flags:0x%x\n",
				mfd->index, req->flags);
			pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
			pipe = mdss_mdp_pipe_alloc(mixer, pipe_type,
			pipe = mdss_mdp_pipe_alloc(mixer, off, pipe_type,
				left_blend_pipe);
		}

+3 −2
Original line number Diff line number Diff line
@@ -1250,11 +1250,12 @@ cursor_done:
}

struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer,
	u32 type, struct mdss_mdp_pipe *left_blend_pipe)
	u32 off, u32 type, struct mdss_mdp_pipe *left_blend_pipe)
{
	struct mdss_mdp_pipe *pipe;

	mutex_lock(&mdss_mdp_sspp_lock);
	pipe = mdss_mdp_pipe_init(mixer, type, 0, left_blend_pipe);
	pipe = mdss_mdp_pipe_init(mixer, type, off, left_blend_pipe);
	mutex_unlock(&mdss_mdp_sspp_lock);
	return pipe;
}