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

Commit ff3d2172 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: fix pp setup on SSPP pipe in rotation scenario"

parents 866aae0d 0dba7d58
Loading
Loading
Loading
Loading
+8 −16
Original line number Diff line number Diff line
@@ -816,18 +816,14 @@ static int pp_vig_pipe_setup(struct mdss_mdp_pipe *pipe, u32 *op)
	unsigned long flags = 0;
	char __iomem *offset;
	struct mdss_data_type *mdata;
	struct msm_fb_data_type *mfd = NULL;
	u32 current_opmode;
	u32 csc_reset;
	u32 dcm_state = DCM_UNINIT;

	pr_debug("pnum=%x\n", pipe->num);

	if (!pipe->mixer || !pipe->mixer->ctl || !pipe->mixer->ctl->mfd) {
		pr_err("Invalid input params for vig pipe setup\n");
		return -EINVAL;
	}

	mfd = pipe->mixer->ctl->mfd;
	if (!pipe->mixer && !pipe->mixer->ctl && !pipe->mixer->ctl->mfd)
		dcm_state = pipe->mixer->ctl->mfd->dcm_state;

	mdata = mdss_mdp_get_mdata();
	if ((pipe->flags & MDP_OVERLAY_PP_CFG_EN) &&
@@ -861,7 +857,7 @@ static int pp_vig_pipe_setup(struct mdss_mdp_pipe *pipe, u32 *op)
	}

	/* Update CSC state only if tuning mode is enable */
	if (mfd->dcm_state == DTM_ENTER) {
	if (dcm_state == DTM_ENTER) {
		/* Reset bit 16 to 19 for CSC_STATE in VIG_OP_MODE */
		csc_reset = 0xFFF0FFFF;
		current_opmode = readl_relaxed(pipe->base +
@@ -1262,21 +1258,17 @@ int mdss_mdp_pipe_sspp_setup(struct mdss_mdp_pipe *pipe, u32 *op)
	char __iomem *pipe_base;
	u32 pipe_num;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct msm_fb_data_type *mfd = NULL;
	u32 current_opmode;
	u32 dcm_state = DCM_UNINIT;

	if (pipe == NULL)
		return -EINVAL;

	if (!pipe->mixer || !pipe->mixer->ctl || !pipe->mixer->ctl->mfd) {
		pr_err("Invalid input params for sspp pipe setup\n");
		return -EINVAL;
	}

	mfd = pipe->mixer->ctl->mfd;
	if (!pipe->mixer && !pipe->mixer->ctl && !pipe->mixer->ctl->mfd)
		dcm_state = pipe->mixer->ctl->mfd->dcm_state;

	/* Read IGC state and update the same if tuning mode is enable */
	if (mfd->dcm_state == DTM_ENTER) {
	if (dcm_state == DTM_ENTER) {
		current_opmode = readl_relaxed(pipe->base +
						MDSS_MDP_REG_SSPP_SRC_OP_MODE);
		*op |= (current_opmode & BIT(16));