summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeera Sundaram Sankaran <veeras@codeaurora.org>2016-05-05 12:03:23 -0700
committerKyle Yan <kyan@codeaurora.org>2016-07-05 15:31:30 -0700
commit95eadad55b28aaaa92b02698ed3600dc06eb6d24 (patch)
tree0f9256c0f6f2e92dbe3337dc341bf1612cb6eed5
parent8370151cfe4d3657c532af7cb90db5f8529453d7 (diff)
msm: mdss: add dynamic resolution switch support during handoff
Add support to handle dynamic resolution switch request during cont-splash handoff, even before driver receives the first commit. The cmd_panel_on is ideally called right before the first kickoff, if the panel is not already on. Make explicit panel_cmd_on call during reconfigure to match with the ctl_stop/ctl_start done during the process of switching. This would make sure complete cleanup and re-configuration of the ctl is done. Change-Id: I98469b14284195caaf17a616137a0502e0e398cf [veeras@codeaurora.org: Resolved conflicts in mdss_mdp.h] Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi.c2
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp.h3
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c20
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_overlay.c8
4 files changed, 31 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi.c b/drivers/video/fbdev/msm/mdss_dsi.c
index 1b46c17861b1..06e5502910b2 100644
--- a/drivers/video/fbdev/msm/mdss_dsi.c
+++ b/drivers/video/fbdev/msm/mdss_dsi.c
@@ -1338,8 +1338,6 @@ static int mdss_dsi_update_panel_config(struct mdss_dsi_ctrl_pdata *ctrl_pdata,
ctrl_pdata->panel_mode = pinfo->mipi.mode;
mdss_panel_get_dst_fmt(pinfo->bpp, pinfo->mipi.mode,
pinfo->mipi.pixel_packing, &(pinfo->mipi.dst_format));
- pinfo->cont_splash_enabled = 0;
-
return ret;
}
diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h
index 8d1d4e42a006..e60f37733186 100644
--- a/drivers/video/fbdev/msm/mdss_mdp.h
+++ b/drivers/video/fbdev/msm/mdss_mdp.h
@@ -505,6 +505,9 @@ struct mdss_mdp_ctl {
u64 last_input_time;
int pending_mode_switch;
u16 frame_rate;
+
+ /* dynamic resolution switch during cont-splash handoff */
+ bool switch_with_handoff;
};
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 e54898e8070f..a1e5982bccda 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
@@ -3359,6 +3359,26 @@ static int mdss_mdp_cmd_reconfigure(struct mdss_mdp_ctl *ctl,
*/
mdss_mdp_cmd_dsc_reconfig(ctl);
+ /*
+ * Make explicit cmd_panel_on call, when dynamic
+ * resolution switch request comes before cont-splash
+ * handoff, to match the ctl_stop/ctl_start done
+ * during the reconfiguration.
+ */
+ if (ctl->switch_with_handoff) {
+ struct mdss_mdp_cmd_ctx *ctx;
+ struct mdss_mdp_ctl *sctl;
+
+ ctx = (struct mdss_mdp_cmd_ctx *)
+ ctl->intf_ctx[MASTER_CTX];
+ if (ctx &&
+ __mdss_mdp_cmd_is_panel_power_off(ctx)) {
+ sctl = mdss_mdp_get_split_ctl(ctl);
+ mdss_mdp_cmd_panel_on(ctl, sctl);
+ }
+ ctl->switch_with_handoff = false;
+ }
+
mdss_mdp_ctl_stop(ctl, MDSS_PANEL_POWER_OFF);
mdss_mdp_ctl_intf_event(ctl,
MDSS_EVENT_DSI_DYNAMIC_SWITCH,
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
index 78e448f2e207..a6f85c6deda8 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
@@ -5433,6 +5433,7 @@ static int mdss_mdp_update_panel_info(struct msm_fb_data_type *mfd,
int ret = 0;
struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
struct mdss_mdp_ctl *ctl = mdp5_data->ctl;
+ struct mdss_data_type *mdata = mdss_mdp_get_mdata();
struct mdss_panel_data *pdata;
struct mdss_mdp_ctl *sctl;
@@ -5466,6 +5467,13 @@ static int mdss_mdp_update_panel_info(struct msm_fb_data_type *mfd,
*/
mdss_mdp_ctl_reconfig(ctl, pdata);
+ /*
+ * Set flag when dynamic resolution switch happens before
+ * handoff of cont-splash
+ */
+ if (mdata->handoff_pending)
+ ctl->switch_with_handoff = true;
+
sctl = mdss_mdp_get_split_ctl(ctl);
if (sctl) {
if (mfd->split_mode == MDP_DUAL_LM_DUAL_DISPLAY) {