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

Commit 851f9eda authored by Adrian Salido-Moreno's avatar Adrian Salido-Moreno Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: perform proper clock handoff during cont. splash screen



During continuous splash screen need to ensure clocks are properly ref
counted once and released once handoff has happened. Doing it in
different places can lead to inproper order and cause clocks to be
disabled. Fix this by centralizing this into footswitch ctrl which is
called when continous splash screen is enabled.

Change-Id: I17f3d5517d9a0583221fdb5c354bf1992ddeddbd
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
parent 90d52535
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1107,6 +1107,14 @@ static u32 mdss_mdp_res_init(struct mdss_data_type *mdata)
	return rc;
}

/**
 * mdss_mdp_footswitch_ctrl_splash() - clocks handoff for cont. splash screen
 * @on: 1 to start handoff, 0 to complete the handoff after first frame update
 *
 * MDSS Clocks and GDSC are already on during continous splash screen, but
 * increasing ref count will keep clocks from being turned off until handoff
 * has properly happend after frame update.
 */
void mdss_mdp_footswitch_ctrl_splash(int on)
{
	int ret;
@@ -1118,9 +1126,12 @@ void mdss_mdp_footswitch_ctrl_splash(int on)
			ret = regulator_enable(mdata->fs);
			if (ret)
				pr_err("Footswitch failed to enable\n");

			mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
			mdss_hw_init(mdata);
		} else {
			pr_debug("Disable MDP FS for splash.\n");
			mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false);
			regulator_disable(mdata->fs);
			mdata->handoff_pending = false;
		}
+0 −1
Original line number Diff line number Diff line
@@ -415,7 +415,6 @@ int mdss_mdp_cmd_reconfigure_splash_done(struct mdss_mdp_ctl *ctl, bool handoff)
	pdata->panel_info.cont_splash_enabled = 0;

	mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_CLK_CTRL, (void *)0);
	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false);

	return ret;
}
+0 −1
Original line number Diff line number Diff line
@@ -757,7 +757,6 @@ int mdss_mdp_video_reconfigure_splash_done(struct mdss_mdp_ctl *ctl,
	free_bootmem_late(mdp5_data->splash_mem_addr,
				 mdp5_data->splash_mem_size);

	mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF, false);
	return ret;
}

+2 −7
Original line number Diff line number Diff line
@@ -2619,14 +2619,9 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)

int mdss_panel_register_done(struct mdss_panel_data *pdata)
{
	/*
	 * Clocks are already on if continuous splash is enabled,
	 * increasing ref_cnt to help balance clocks once done.
	 */
	if (pdata->panel_info.cont_splash_enabled) {
	if (pdata->panel_info.cont_splash_enabled)
		mdss_mdp_footswitch_ctrl_splash(1);
		mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON, false);
	}

	return 0;
}