summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorHarsh Sahu <hsahu@codeaurora.org>2017-06-02 17:48:10 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-06-08 15:16:24 -0700
commit0bb5e6610af845ab5a2a45d550303baa4c4a437f (patch)
tree6962515d9b7fab16f51106f69d01c8776a073a80 /drivers/video/fbdev
parent9725c4d90bee3b0be78bb1fdc084df1ec08d7d24 (diff)
msm: mdss: handle vsync properly during dynamic resolution switch
During resolution switch, the vsync is disabled just before the switch as part of ctrl stop, but it is not enabled back after the switch. This change keeps track of vsync before the switch and handles it appropriately after the switch. Change-Id: I3eed93d7f7635217bac3c19c61f68154cacef56e Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.h1
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h
index 5a15b557e5c7..feea8986af91 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.h
+++ b/drivers/video/fbdev/msm/mdss_mdp.h
@@ -586,6 +586,7 @@ struct mdss_mdp_ctl {
struct mdss_mdp_avr_info avr_info;
bool commit_in_progress;
struct mutex ds_lock;
+ bool need_vsync_on;
};
struct mdss_mdp_mixer {
diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
index 2e017fe5ec02..747b4e3e2f81 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
@@ -3859,12 +3859,24 @@ static int mdss_mdp_cmd_reconfigure(struct mdss_mdp_ctl *ctl,
}
ctl->switch_with_handoff = false;
}
+ /*
+ * keep track of vsync, so it can be enabled as part
+ * of the post switch sequence
+ */
+ if (ctl->vsync_handler.enabled)
+ ctl->need_vsync_on = true;
mdss_mdp_ctl_stop(ctl, MDSS_PANEL_POWER_OFF);
mdss_mdp_ctl_intf_event(ctl,
MDSS_EVENT_DSI_DYNAMIC_SWITCH,
(void *) mode, CTL_INTF_EVENT_FLAG_DEFAULT);
} else {
+ if (ctl->need_vsync_on &&
+ ctl->ops.add_vsync_handler) {
+ ctl->ops.add_vsync_handler(ctl,
+ &ctl->vsync_handler);
+ ctl->need_vsync_on = false;
+ }
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
}
}