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

Commit ff605d64 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "Revert "msm: mdss: Handle fb_release_all before cont-splash handoff"""

parents b5b35ebf 055179ea
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -821,6 +821,8 @@ struct mdss_overlay_private {
	u32 bl_events;
	u32 ad_events;
	u32 ad_bl_events;

	bool allow_kickoff;
};

struct mdss_mdp_set_ot_params {
+26 −18
Original line number Diff line number Diff line
@@ -1353,6 +1353,9 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
		mdss_mdp_release_splash_pipe(mfd);
		return 0;
	} else if (mfd->panel_info->cont_splash_enabled) {
		if (mdp5_data->allow_kickoff) {
			mdp5_data->allow_kickoff = false;
		} else {
			mutex_lock(&mdp5_data->list_lock);
			rc = list_empty(&mdp5_data->pipes_used);
			mutex_unlock(&mdp5_data->list_lock);
@@ -1361,6 +1364,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
					mfd->index);
				return -EPERM;
			}
		}
	} else if (mdata->handoff_pending) {
		pr_warn("fb%d: commit while splash handoff pending\n",
				mfd->index);
@@ -5082,6 +5086,7 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
{
	int rc;
	struct mdss_overlay_private *mdp5_data;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_mdp_mixer *mixer;
	int need_cleanup;
	int retire_cnt;
@@ -5100,18 +5105,6 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
		return -ENODEV;
	}

	if (!mdss_mdp_ctl_is_power_on(mdp5_data->ctl)) {
		if (mfd->panel_reconfig) {
			if (mfd->panel_info->cont_splash_enabled)
				mdss_mdp_handoff_cleanup_ctl(mfd);

			mdp5_data->borderfill_enable = false;
			mdss_mdp_ctl_destroy(mdp5_data->ctl);
			mdp5_data->ctl = NULL;
		}
		return 0;
	}

	/*
	 * Keep a reference to the runtime pm until the overlay is turned
	 * off, and then release this last reference at the end. This will
@@ -5156,7 +5149,20 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)

	if (need_cleanup) {
		pr_debug("cleaning up pipes on fb%d\n", mfd->index);
		if (mdata->handoff_pending)
			mdp5_data->allow_kickoff = true;

		mdss_mdp_overlay_kickoff(mfd, NULL);
	} else if (!mdss_mdp_ctl_is_power_on(mdp5_data->ctl)) {
		if (mfd->panel_reconfig) {
			if (mfd->panel_info->cont_splash_enabled)
				mdss_mdp_handoff_cleanup_ctl(mfd);

			mdp5_data->borderfill_enable = false;
			mdss_mdp_ctl_destroy(mdp5_data->ctl);
			mdp5_data->ctl = NULL;
		}
		goto end;
	}

	/*
@@ -5231,6 +5237,7 @@ ctl_stop:
		mdp5_data->wfd = NULL;
	}

end:
	/* Release the last reference to the runtime device */
	rc = pm_runtime_put(&mfd->pdev->dev);
	if (rc)
@@ -5658,6 +5665,7 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd)
	mdp5_data->hw_refresh = true;
	mdp5_data->cursor_ndx[CURSOR_PIPE_LEFT] = MSMFB_NEW_REQUEST;
	mdp5_data->cursor_ndx[CURSOR_PIPE_RIGHT] = MSMFB_NEW_REQUEST;
	mdp5_data->allow_kickoff = false;

	mfd->mdp.private1 = mdp5_data;
	mfd->wait_for_kickoff = true;