diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index b782f77d4e3f..fbf7e5ca8eb0 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -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 diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index d042bb3ff409..a81588eeee94 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -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);