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

Commit d7bb1dad authored by Terence Hampson's avatar Terence Hampson
Browse files

msm: mdss: Prevent modification to image roi when scaling



If pixel extension is enabled by scaler, and layer content is
deinterlaced, the modifications to the layers region of interest
to be used by mdp hw has already been modified. We should not
further changing these values.

Change-Id: I2c528b54ce07e90b66b56ef008b73b78e4227c9d
Signed-off-by: default avatarTerence Hampson <thampson@codeaurora.org>
parent 88240c83
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -359,7 +359,8 @@ int mdss_mdp_overlay_req_check(struct msm_fb_data_type *mfd,
			}
		}

		if (req->flags & MDP_DEINTERLACE) {
		if ((req->flags & MDP_DEINTERLACE) &&
					!req->scale.enable_pxl_ext) {
			if (req->flags & MDP_SOURCE_ROTATED_90) {
				if ((req->src_rect.w % 4) != 0) {
					pr_err("interlaced rect not h/4\n");
@@ -864,16 +865,13 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	 * When scaling is enabled src crop and image
	 * width and height is modified by user
	 */
	if ((pipe->flags & MDP_DEINTERLACE)) {
	if ((pipe->flags & MDP_DEINTERLACE) && !pipe->scale.enable_pxl_ext) {
		if (pipe->flags & MDP_SOURCE_ROTATED_90) {
			pipe->src.x = DIV_ROUND_UP(pipe->src.x, 2);
			pipe->src.x &= ~1;
			if (!pipe->scale.enable_pxl_ext) {
			pipe->src.w /= 2;
			pipe->img_width /= 2;
			}
		} else {
			if (!pipe->scale.enable_pxl_ext)
			pipe->src.h /= 2;
			pipe->src.y = DIV_ROUND_UP(pipe->src.y, 2);
			pipe->src.y &= ~1;