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

Commit cf256a2a 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: rotator: deinterlace layer prior to rotation"

parents 2002720e 0c078770
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -1351,6 +1351,20 @@ static int mdss_rotator_validate_img_roi(struct mdp_rotation_item *item)
	return ret;
}

static int mdss_rotator_validate_fmt_and_item_flags(
	struct mdp_rotation_config *config, struct mdp_rotation_item *item)
{
	struct mdss_mdp_format_params *fmt;

	fmt = mdss_mdp_get_format_params(item->input.format);
	if ((item->flags & MDP_ROTATION_DEINTERLACE) &&
			mdss_mdp_is_ubwc_format(fmt)) {
		pr_err("cannot perform mdp deinterlace on tiled formats\n");
		return -EINVAL;
	}
	return 0;
}

static int mdss_rotator_validate_entry(struct mdss_rot_mgr *mgr,
	struct mdss_rot_file_private *private,
	struct mdss_rot_entry *entry)
@@ -1391,6 +1405,10 @@ static int mdss_rotator_validate_entry(struct mdss_rot_mgr *mgr,
		return ret;
	}

	ret = mdss_rotator_validate_fmt_and_item_flags(&perf->config, item);
	if (ret)
		return ret;

	ret = mdss_rotator_config_dnsc_factor(mgr, entry);
	if (ret) {
		pr_err("fail to configure downscale factor\n");
@@ -1616,7 +1634,7 @@ static void mdss_rotator_translate_rect(struct mdss_rect *dst,

static u32 mdss_rotator_translate_flags(u32 input)
{
	u32 output;
	u32 output = 0;

	if (input & MDP_ROTATION_NOP)
		output |= MDP_ROT_NOP;
@@ -1626,6 +1644,8 @@ static u32 mdss_rotator_translate_flags(u32 input)
		output |= MDP_FLIP_UD;
	if (input & MDP_ROTATION_90)
		output |= MDP_ROT_90;
	if (input & MDP_ROTATION_DEINTERLACE)
		output |= MDP_DEINTERLACE;
	if (input & MDP_ROTATION_SECURE)
		output |= MDP_SECURE_OVERLAY_SESSION;
	if (input & MDP_ROTATION_BWC_EN)