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

Commit 0da27e90 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: do not skip pipe programming if roi changed"

parents 429eec80 438c0bcc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ enum mdss_hw_quirk {
	MDSS_QUIRK_ROTCDP,
	MDSS_QUIRK_DOWNSCALE_HANG,
	MDSS_QUIRK_DSC_RIGHT_ONLY_PU,
	MDSS_QUIRK_DSC_2SLICE_PU_THRPUT,
	MDSS_QUIRK_MAX,
};

+1 −0
Original line number Diff line number Diff line
@@ -1249,6 +1249,7 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata)
			mdata->mdss_caps_map);
		mdss_mdp_init_default_prefill_factors(mdata);
		mdss_set_quirk(mdata, MDSS_QUIRK_DSC_RIGHT_ONLY_PU);
		mdss_set_quirk(mdata, MDSS_QUIRK_DSC_2SLICE_PU_THRPUT);
		break;
	case MDSS_MDP_HW_REV_105:
	case MDSS_MDP_HW_REV_109:
+20 −0
Original line number Diff line number Diff line
@@ -750,6 +750,26 @@ enum mdss_mdp_clt_intf_event_flags {
#define mfd_to_wb(mfd) (((struct mdss_overlay_private *)\
				(mfd->mdp.private1))->wb)

/**
 * - mdss_mdp_is_roi_changed
 * @mfd - pointer to mfd
 *
 * Function returns true if roi is changed for any layer mixer of a given
 * display, false otherwise.
 */
static inline bool mdss_mdp_is_roi_changed(struct msm_fb_data_type *mfd)
{
	struct mdss_mdp_ctl *ctl;

	if (!mfd)
		return false;

	ctl = mfd_to_ctl(mfd); /* returns master ctl */

	return ctl->mixer_left->roi_changed ||
	      (is_split_lm(mfd) ? ctl->mixer_right->roi_changed : false);
}

/**
 * - mdss_mdp_is_both_lm_valid
 * @main_ctl - pointer to a main ctl
+43 −3
Original line number Diff line number Diff line
@@ -2430,9 +2430,6 @@ static void mdss_mdp_ctl_dsc_config(struct mdss_mdp_mixer *mixer,
	mdss_mdp_pingpong_write(mixer->pingpong_base,
		MDSS_MDP_REG_PP_DCE_DATA_OUT_SWAP, data);

	/* dce0_sel->pp0, dce1_sel->pp1 */
	writel_relaxed(0x0, offset + MDSS_MDP_REG_DCE_SEL);

	if (mixer->num == MDSS_MDP_INTF_LAYERMIXER0) {
		offset += MDSS_MDP_DSC_0_OFFSET;
	} else if (mixer->num == MDSS_MDP_INTF_LAYERMIXER1) {
@@ -2684,6 +2681,49 @@ void mdss_mdp_ctl_dsc_setup(struct mdss_mdp_ctl *ctl,
		left_valid = true;
	}

	if ((is_dual_lm_single_display(ctl->mfd)) &&
	    (pinfo->partial_update_enabled) &&
	    (pinfo->dsc_enc_total == 2) && (dsc->full_frame_slices == 4) &&
	    (mdss_has_quirk(mdata, MDSS_QUIRK_DSC_2SLICE_PU_THRPUT))) {

		if (mdss_mdp_is_both_lm_valid(ctl)) {
			/* left + right */

			pr_debug("full line (4 slices) or middle 2 slice partial update\n");
			writel_relaxed(0x0,
				mdata->mdp_base + mdata->ppb[0].ctl_off);
			writel_relaxed(0x0,
				mdata->mdp_base + MDSS_MDP_REG_DCE_SEL);
		} else if (mixer_left->valid_roi || mixer_right->valid_roi) {
			/* left-only or right-only */

			u32 this_frame_slices =
				dsc->pic_width / dsc->slice_width;

			if (this_frame_slices == 2) {
				pr_debug("2 slice parital update, use merge\n");

				/* tandem + merge */
				mode = BIT(1) | BIT(0);

				right_valid = true;
				left_valid = true;

				writel_relaxed(0x2 << 4, mdata->mdp_base +
					mdata->ppb[0].ctl_off);
				writel_relaxed(BIT(0),
					mdata->mdp_base + MDSS_MDP_REG_DCE_SEL);
			} else {
				pr_debug("only one slice partial update\n");
				writel_relaxed(0x0,
					mdata->mdp_base +
					mdata->ppb[0].ctl_off);
				writel_relaxed(0x0,
					mdata->mdp_base + MDSS_MDP_REG_DCE_SEL);
			}
		}
	}

	if (left_valid) {
		mdss_mdp_ctl_dsc_config(mixer_left, dsc, mode,
			ich_reset_override);
+7 −2
Original line number Diff line number Diff line
@@ -1516,8 +1516,13 @@ static int __overlay_queue_pipes(struct msm_fb_data_type *mfd)
		if (buf && (buf->state == MDP_BUF_STATE_READY)) {
			buf->state = MDP_BUF_STATE_ACTIVE;
			ret = mdss_mdp_data_map(buf, false, DMA_TO_DEVICE);
		} else if (!pipe->params_changed) {
			/* nothing to update so continue with next */
		} else if (!pipe->params_changed &&
			   !mdss_mdp_is_roi_changed(pipe->mfd)) {

			/*
			 * no update for the given pipe nor any change in the
			 * ROI so skip pipe programming and continue with next.
			 */
			continue;
		} else if (buf) {
			BUG_ON(buf->state != MDP_BUF_STATE_ACTIVE);