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

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

msm: mdss: unstage pipes after entering display recovery sequence



When there are any issues halting pipes during free, we go into recovery
sequence where pipes that cannot be cleaned up are forcefully staged to
get recovered. After this we need to remove them to complete recovery
sequence, otherwise it will remain active which is not the intention.
Also add check to ensure we catch such cases for all dual mixer cases.

Change-Id: If9fb04130de286eb1bf9a8171461df693dc2493d
Signed-off-by: default avatarAdrian Salido-Moreno <adrianm@codeaurora.org>
parent 247909f4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1516,9 +1516,11 @@ static void __overlay_kickoff_requeue(struct msm_fb_data_type *mfd)
	mdss_mdp_display_commit(ctl, NULL, NULL);
	mdss_mdp_display_wait4comp(ctl);

	ATRACE_BEGIN("sspp_programming");
	/* unstage any recovery pipes and re-queue used pipes */
	mdss_mdp_mixer_unstage_all(ctl->mixer_left);
	mdss_mdp_mixer_unstage_all(ctl->mixer_right);

	__overlay_queue_pipes(mfd);
	ATRACE_END("sspp_programming");

	mdss_mdp_display_commit(ctl, NULL,  NULL);
	mdss_mdp_display_wait4comp(ctl);
+14 −4
Original line number Diff line number Diff line
@@ -1090,13 +1090,23 @@ static bool mdss_mdp_check_pipe_in_use(struct mdss_mdp_pipe *pipe)
			continue;

		mixer = ctl->mixer_left;
		if (!mixer || mixer->rotator_mode)
		if (mixer && mixer->rotator_mode)
			continue;

		mixercfg = mdss_mdp_get_mixercfg(mixer);
		if ((mixercfg & stage_off_mask) && ctl->play_cnt) {
			pr_err("BUG. pipe%d is active. mcfg:0x%x mask:0x%x\n",
				pipe->num, mixercfg, stage_off_mask);
		if (mixercfg & stage_off_mask) {
			pr_err("IN USE: mixer=%d pipe=%d mcfg:0x%x mask:0x%x\n",
				mixer->num, pipe->num,
				mixercfg, stage_off_mask);
			BUG();
		}

		mixer = ctl->mixer_right;
		mixercfg = mdss_mdp_get_mixercfg(mixer);
		if (mixercfg & stage_off_mask) {
			pr_err("IN USE: mixer=%d pipe=%d mcfg:0x%x mask:0x%x\n",
				mixer->num, pipe->num,
				mixercfg, stage_off_mask);
			BUG();
		}
	}