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

Commit f41c7f04 authored by Adrian Salido-Moreno's avatar Adrian Salido-Moreno Committed by Veera Sundaram Sankaran
Browse files

msm: mdss: handle blank while mode switch in progress



When display is getting blanked while mode switch in progress, we
cannot have additional kickoff trigger for cleanup as the state hasn't
been properly transitioned. Instead we can clear the state and destroy
control path to start clean on next update.

Change-Id: I34af01550d79e0d7d465f2c7f873508c296160dd
[veeras@codeaurora.org: Resolved conflicts in mdss_mdp_overlay.c]
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent fbfdd7c9
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -4952,6 +4952,7 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
	struct mdss_mdp_mixer *mixer;
	int need_cleanup;
	int retire_cnt;
	bool destroy_ctl = false;

	if (!mfd)
		return -ENODEV;
@@ -5008,6 +5009,18 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
	mutex_unlock(&mdp5_data->list_lock);
	mutex_unlock(&mdp5_data->ov_lock);

	destroy_ctl = !mfd->ref_cnt || mfd->panel_reconfig;

	mutex_lock(&mfd->switch_lock);
	if (mfd->switch_state != MDSS_MDP_NO_UPDATE_REQUESTED) {
		destroy_ctl = true;
		need_cleanup = false;
		pr_warn("fb%d blank while mode switch (%d) in progress\n",
				mfd->index, mfd->switch_state);
		mfd->switch_state = MDSS_MDP_NO_UPDATE_REQUESTED;
	}
	mutex_unlock(&mfd->switch_lock);

	if (need_cleanup) {
		pr_debug("cleaning up pipes on fb%d\n", mfd->index);
		mdss_mdp_overlay_kickoff(mfd, NULL);
@@ -5061,7 +5074,7 @@ ctl_stop:
			mdss_mdp_ctl_notifier_unregister(mdp5_data->ctl,
					&mfd->mdp_sync_pt_data.notifier);

			if (!mfd->ref_cnt || mfd->panel_reconfig) {
			if (destroy_ctl) {
				mdp5_data->borderfill_enable = false;
				mdss_mdp_ctl_destroy(mdp5_data->ctl);
				mdp5_data->ctl = NULL;