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

Commit 7e892a01 authored by Clarence Ip's avatar Clarence Ip
Browse files

drm/msm/sde: ignore scaler v2 data if not enabled



The incoming scaler v2 user data isn't guaranteed to be
valid if the 'enable' field is set to zero, so ignore
the entire structure unless the enable is explicitly set
to a non-zero value.

CRs-Fixed: 2052501
Change-Id: Ieeb24122a5caffcd7361007e52219cee94e33eee
Signed-off-by: default avatarClarence Ip <cip@codeaurora.org>
parent 059c8c3a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3686,6 +3686,12 @@ static inline void _sde_plane_set_scaler_v2(struct sde_plane *psde,
		return;
	}

	/* detach/ignore user data if 'disabled' */
	if (!scale_v2.enable) {
		SDE_DEBUG_PLANE(psde, "scale data removed\n");
		return;
	}

	/* populate from user space */
	pe = &(psde->pixel_ext);
	memset(pe, 0, sizeof(struct sde_hw_pixel_ext));