From 6fb03d774ad98b0673835115bc21da2ba2a0372a Mon Sep 17 00:00:00 2001 From: Naseer Ahmed Date: Fri, 3 Feb 2017 17:10:39 -0500 Subject: [PATCH] msm: mdss: Handle ping pong split configuration in splash done After continuous splash reconfiguration, when turning off the clocks ping pong split configuration is not handled properly. Pingpong split uses single controller and dual context, so the second context of the same controller should be used instead of the slave controller. Change-Id: Ibafdfd0aba4e0f02f141d60cb8866f353137a3ce Signed-off-by: Naseer Ahmed --- drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index b7f27b818eda..72deefd0394c 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -1981,22 +1981,34 @@ int mdss_mdp_cmd_reconfigure_splash_done(struct mdss_mdp_ctl *ctl, bool handoff) { struct mdss_panel_data *pdata; - struct mdss_mdp_ctl *sctl = mdss_mdp_get_split_ctl(ctl); + struct mdss_mdp_ctl *sctl = NULL; + struct mdss_mdp_cmd_ctx *sctx = NULL; struct dsi_panel_clk_ctrl clk_ctrl; int ret = 0; + /* Get both controllers in the correct order for dual displays */ + mdss_mdp_get_split_display_ctls(&ctl, &sctl); + + if (sctl) + sctx = (struct mdss_mdp_cmd_ctx *) sctl->intf_ctx[MASTER_CTX]; + + /* In pingpong split we have single controller, dual context */ + if (is_pingpong_split(ctl->mfd)) + sctx = (struct mdss_mdp_cmd_ctx *) ctl->intf_ctx[SLAVE_CTX]; + pdata = ctl->panel_data; clk_ctrl.state = MDSS_DSI_CLK_OFF; clk_ctrl.client = DSI_CLK_REQ_MDP_CLIENT; - if (sctl) { + + if (sctx) { /* then slave */ u32 flags = CTL_INTF_EVENT_FLAG_SKIP_BROADCAST; - if (is_pingpong_split(sctl->mfd)) + if (sctx->pingpong_split_slave) flags |= CTL_INTF_EVENT_FLAG_SLAVE_INTF; - mdss_mdp_ctl_intf_event(sctl, MDSS_EVENT_PANEL_CLK_CTRL, - (void *)&clk_ctrl, flags); + mdss_mdp_ctl_intf_event(sctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL, + (void *)&clk_ctrl, flags); } mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL,