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

Commit d9577532 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: Prevent modification to image roi when scaling"

parents 95a131c1 d7bb1dad
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;