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

Commit c2655a01 authored by Terence Hampson's avatar Terence Hampson Committed by Matt Wagantall
Browse files

msm: mdss: rotator: input/output format validation correction



It is possible for rotator to drop alpha value from RGBA8888
or to add don't care to RGB888.

Change-Id: I17b6ba7a4d793c4f77be5cb5e98a3b9aa59e90f4
Signed-off-by: default avatarTerence Hampson <thampson@codeaurora.org>
parent 4afb6d35
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -747,9 +747,15 @@ static bool mdss_rotator_verify_format(struct mdss_rot_mgr *mgr,

	/* Forcing same pixel depth */
	if (memcmp(in_fmt->bits, out_fmt->bits, sizeof(in_fmt->bits))) {
		/* Exception is that RGB can drop alpha or add X */
		if (in_fmt->is_yuv || out_fmt->alpha_enable ||
			(in_fmt->bits[C2_R_Cr] != out_fmt->bits[C2_R_Cr]) ||
			(in_fmt->bits[C0_G_Y] != out_fmt->bits[C0_G_Y]) ||
			(in_fmt->bits[C1_B_Cb] != out_fmt->bits[C1_B_Cb])) {
			pr_err("Bit format does not match\n");
			return false;
		}
	}

	/* Need to make sure that sub-sampling persists through rotation */
	if (rotation) {