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

Commit 85c4012b authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: fix scaler validation in crtc atomic check



Fix the scaler check to validate dst width/height against
scaler_src width/height instead.

Change-Id: If6cdcf55d47aa63acac6a6ddd3042bac345f80bd
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent b9ab0c93
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -2457,13 +2457,14 @@ static int _sde_atomic_check_decimation_scaler(struct drm_plane_state *state,
	}

	/* check max scaler capability */
	else if (((src_deci_w * max_upscale) < dst->w) ||
		((src_deci_h * max_upscale) < dst->h) ||
		((dst->w * max_downscale) < src_deci_w) ||
		((dst->h * max_downscale) < src_deci_h)) {
	else if (((scaler_src_w * max_upscale) < dst->w) ||
		((scaler_src_h * max_upscale) < dst->h) ||
		((dst->w * max_downscale) < scaler_src_w) ||
		((dst->h * max_downscale) < scaler_src_h)) {
		SDE_ERROR_PLANE(psde,
			"too much scaling requested %ux%u->%ux%u\n",
			src_deci_w, src_deci_h, dst->w, dst->h);
			"too much scaling requested %ux%u->%ux%u rot:%d\n",
			scaler_src_w, scaler_src_h, dst->w, dst->h,
			inline_rotation);
		ret = -E2BIG;
	} else if (_sde_plane_validate_scaler_v2(psde, pstate, fmt,
				width, height,