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

Commit 3d444ac0 authored by Camus Wong's avatar Camus Wong
Browse files

msm: mdp: Skip overlay start from overlay on if handoff pending



If handoff is pending, we should skip the overlay start and kickoff
and return success for overlay on. This is to ensure that fb open
succeeds for all displays despite handoff being pending.

Change-Id: If75f3a4ea61c48ee6b3c97096d20c592723fa97c
Signed-off-by: default avatarCamus Wong <camusw@codeaurora.org>
parent f295d9e7
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -4824,6 +4824,7 @@ static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
	int rc;
	struct mdss_overlay_private *mdp5_data;
	struct mdss_mdp_ctl *ctl = NULL;
	struct mdss_data_type *mdata;

	if (!mfd)
		return -ENODEV;
@@ -4835,6 +4836,10 @@ static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
	if (!mdp5_data)
		return -EINVAL;

	mdata = mfd_to_mdata(mfd);
	if (!mdata)
		return -EINVAL;

	mdss_mdp_set_lm_flag(mfd);

	if (!mdp5_data->ctl) {
@@ -4864,9 +4869,16 @@ static int mdss_mdp_overlay_on(struct msm_fb_data_type *mfd)
	if (rc)
		goto panel_on;

	/* Skip the overlay start and kickoff for all displays
	if handoff is pending. Previously we skipped it for DTV
	panel and pluggable panels (bridge chip hdmi case). But
	it does not cover the case where there is a non pluggable
	tertiary display. Using the flag handoff_pending to skip
	overlay start and kickoff should cover all cases
	TODO: In the long run, the overlay start and kickoff
	should not be skipped, instead, the handoff can be done */
	if (!mfd->panel_info->cont_splash_enabled &&
		(mfd->panel_info->type != DTV_PANEL) &&
			!mfd->panel_info->is_pluggable) {
		!mdata->handoff_pending) {
		rc = mdss_mdp_overlay_start(mfd);
		if (rc)
			goto end;