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

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

Merge "Revert "msm: mdss: calculate the correct ROI for flipped panels""

parents 4867fb83 56dd06a2
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -712,25 +712,9 @@ static int mdss_mdp_cmd_set_partial_roi(struct mdss_mdp_ctl *ctl)
	if (!ctl->panel_data->panel_info.partial_update_enabled)
		return rc;

	if (ctl->roi.w && ctl->roi.h && ctl->roi_changed) {
		if (ctl->mfd && (ctl->mfd->panel_orientation & MDP_FLIP_LR))
			ctl->panel_data->panel_info.roi.x =
				ctl->mixer_left->width -
					(ctl->roi.x + ctl->roi.w);
		else
			ctl->panel_data->panel_info.roi.x = ctl->roi.x;
		if (ctl->mfd && (ctl->mfd->panel_orientation & MDP_FLIP_UD))
			ctl->panel_data->panel_info.roi.y =
				ctl->mixer_left->height -
					(ctl->roi.y + ctl->roi.h);
		else
			ctl->panel_data->panel_info.roi.y = ctl->roi.y;
		ctl->panel_data->panel_info.roi.w = ctl->roi.w;
		ctl->panel_data->panel_info.roi.h = ctl->roi.h;

	/* set panel col and page addr */
	rc = mdss_mdp_ctl_intf_event(ctl,
			MDSS_EVENT_ENABLE_PARTIAL_ROI, NULL);
	}
	return rc;
}

+7 −0
Original line number Diff line number Diff line
@@ -830,6 +830,13 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
		pipe->dst.y += mixer->ctl->border_y_off;
	}

	if (mfd->panel_orientation & MDP_FLIP_LR)
		pipe->dst.x = pipe->mixer_left->width
			- pipe->dst.x - pipe->dst.w;
	if (mfd->panel_orientation & MDP_FLIP_UD)
		pipe->dst.y = pipe->mixer_left->height
			- pipe->dst.y - pipe->dst.h;

	pipe->horz_deci = req->horz_deci;
	pipe->vert_deci = req->vert_deci;

+0 −10
Original line number Diff line number Diff line
@@ -1358,7 +1358,6 @@ static int mdss_mdp_image_setup(struct mdss_mdp_pipe *pipe,
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_rect sci, dst, src;
	bool rotation = false;
	u32 panel_orientation = 0;

	pr_debug("ctl: %d pnum=%d wh=%dx%d src={%d,%d,%d,%d} dst={%d,%d,%d,%d}\n",
			pipe->mixer_left->ctl->num, pipe->num,
@@ -1414,15 +1413,6 @@ static int mdss_mdp_image_setup(struct mdss_mdp_pipe *pipe,
		}
	}

	if (!(pipe->mixer_left->rotator_mode)) {
		panel_orientation = pipe->mixer_left->ctl->mfd->panel_orientation;
		if (panel_orientation & MDP_FLIP_LR)
			dst.x =  pipe->mixer_left->ctl->roi.w - dst.x - dst.w;

		if (panel_orientation & MDP_FLIP_UD)
			dst.y =  pipe->mixer_left->ctl->roi.h - dst.y - dst.h;
	}

	src_size = (src.h << 16) | src.w;
	src_xy = (src.y << 16) | src.x;
	dst_size = (dst.h << 16) | dst.w;