summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2015-10-21 14:33:46 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:47:31 -0700
commit8df91abd3e807f3d9bf62e1257fc8a80fcd3cc45 (patch)
tree4a328dcd126767bb04345fc6c91c0f300fecf8e5 /drivers/video/fbdev
parent6489c0aef1e0d776ea5fc0620cb58ec439fb6bb2 (diff)
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: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.h20
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_overlay.c9
2 files changed, 27 insertions, 2 deletions
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
@@ -751,6 +751,26 @@ enum mdss_mdp_clt_intf_event_flags {
(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);