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

Commit 438c0bcc authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: do not skip pipe programming if roi changed



Current driver has an optimization where if pipe parameters are not
changed between consecutive updates then it will skip pipe's HW register
programming. However when partial update is enabled and ROI is changed
compared to previous update, pipe's HW programming should not be skipped
because HW is programmed with stale ROI for that given pipe. Fix this by
forcing pipe HW programming update if ROI is changed.

Change-Id: Iebff043ecbb35b22ffbe344bdffa830602437252
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent eb007e67
Loading
Loading
Loading
Loading
+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
+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);