Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da5b9d06 authored by Naseer Ahmed's avatar Naseer Ahmed Committed by Abhijith Desai
Browse files

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: default avatarNaseer Ahmed <naseer@codeaurora.org>
Signed-off-by: default avatarAbhijith Desai <desaia@codeaurora.org>
parent 7c0450d8
Loading
Loading
Loading
Loading
+19 −5
Original line number Diff line number Diff line
@@ -696,6 +696,8 @@ int mdss_mdp_get_split_display_ctls(struct mdss_mdp_ctl **ctl,
				pr_err("%s cannot find master ctl\n",
					__func__);
				WARN_ON(1);
				rc = -EINVAL;
				goto exit;
			}
			/*
			 * We have both controllers but sctl has the Master,
@@ -1996,21 +1998,33 @@ 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,
		mdss_mdp_ctl_intf_event(sctx->ctl, MDSS_EVENT_PANEL_CLK_CTRL,
					(void *)&clk_ctrl, flags);
	}