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

Commit 55931ab7 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: restore pipe src/dst rect after multiple PU ROI update



During multiple partial update, each pipe is checked against
the two ROIs and the pipe's src and dst rect are cropped and
adjusted with respect to first_roi or second_roi, based on its
position. If the pipe is used with the same configs in the next
kickoff, restore the pipe's actual src/dst before continuing with
the kickoff.

Change-Id: I1db579626d96302e07fef1a755fb39944d3eaca8
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent e9537554
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -1886,6 +1886,8 @@ static void __restore_pipe(struct mdss_mdp_pipe *pipe)
	pipe->dst.y = pipe->layer.dst_rect.y;
	pipe->dst.y = pipe->layer.dst_rect.y;
	pipe->dst.w = pipe->layer.dst_rect.w;
	pipe->dst.w = pipe->layer.dst_rect.w;
	pipe->dst.h = pipe->layer.dst_rect.h;
	pipe->dst.h = pipe->layer.dst_rect.h;

	pipe->restore_roi = false;
}
}


 /**
 /**
@@ -1909,7 +1911,6 @@ static int __crop_adjust_pipe_rect(struct mdss_mdp_pipe *pipe,
	u32 roi_y_pos;
	u32 roi_y_pos;
	int ret = 0;
	int ret = 0;


	pipe->restore_roi = false;
	if (mdss_rect_overlap_check(&pipe->dst, &dual_roi->first_roi)) {
	if (mdss_rect_overlap_check(&pipe->dst, &dual_roi->first_roi)) {
		mdss_mdp_crop_rect(&pipe->src, &pipe->dst,
		mdss_mdp_crop_rect(&pipe->src, &pipe->dst,
				&dual_roi->first_roi, false);
				&dual_roi->first_roi, false);
@@ -2055,6 +2056,13 @@ static void __validate_and_set_roi(struct msm_fb_data_type *mfd,
	}
	}


	list_for_each_entry(pipe, &mdp5_data->pipes_used, list) {
	list_for_each_entry(pipe, &mdp5_data->pipes_used, list) {
		/*
		 * Restore the pipe src/dst ROI if it was altered
		 * in the previous kickoff.
		 */
		if (pipe->restore_roi)
			__restore_pipe(pipe);

		pr_debug("pipe:%d src:{%d,%d,%d,%d} dst:{%d,%d,%d,%d}\n",
		pr_debug("pipe:%d src:{%d,%d,%d,%d} dst:{%d,%d,%d,%d}\n",
			pipe->num, pipe->src.x, pipe->src.y,
			pipe->num, pipe->src.x, pipe->src.y,
			pipe->src.w, pipe->src.h, pipe->dst.x,
			pipe->src.w, pipe->src.h, pipe->dst.x,
+1 −0
Original line number Original line Diff line number Diff line
@@ -1114,6 +1114,7 @@ static void mdss_mdp_init_pipe_params(struct mdss_mdp_pipe *pipe)
	pipe->is_right_blend = false;
	pipe->is_right_blend = false;
	pipe->src_split_req = false;
	pipe->src_split_req = false;
	pipe->bwc_mode = 0;
	pipe->bwc_mode = 0;
	pipe->restore_roi = false;


	pipe->mfd = NULL;
	pipe->mfd = NULL;
	pipe->mixer_left = pipe->mixer_right = NULL;
	pipe->mixer_left = pipe->mixer_right = NULL;