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

Commit 490abb23 authored by Raviteja Tamatam's avatar Raviteja Tamatam Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: validate de-interlace and scalar concurrency



In de-interlace video plus scalar concurrency case-
pipe fetch, unpack output and scalar block input number of lines
should match. Otherwise, it will lead to hang. Added check to
validate this condition.

Change-Id: I00453dda36b5291948b99d0f0a89105b6875c039
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent 9956996a
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -3452,6 +3452,25 @@ static int _sde_plane_validate_scaler_v2(struct sde_plane *psde,
				src_w, src_h);
			return -EINVAL;
		}

		/*
		 * SSPP fetch , unpack output and QSEED3 input lines need
		 * to match for Y plane
		 */
		if (i == 0 &&
			(sde_plane_get_property(pstate, PLANE_PROP_SRC_CONFIG) &
			BIT(SDE_DRM_DEINTERLACE)) &&
			((pstate->scaler3_cfg.src_height[i] != (src_h/2)) ||
			(pstate->pixel_ext.roi_h[i] != (src_h/2)))) {
			SDE_ERROR_PLANE(psde,
				"de-interlace fail roi[%d] %d/%d, src %dx%d, src %dx%d\n",
				i, pstate->pixel_ext.roi_w[i],
				pstate->pixel_ext.roi_h[i],
				pstate->scaler3_cfg.src_width[i],
				pstate->scaler3_cfg.src_height[i],
				src_w, src_h);
			return -EINVAL;
		}
	}

	pstate->scaler_check_state = SDE_PLANE_SCLCHECK_SCALER_V2;