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

Commit ba685975 authored by Harsh Sahu's avatar Harsh Sahu Committed by Abhijith Desai
Browse files

msm: mdss: handle vsync properly during dynamic resolution switch



During resolution switch, the vsync is disabled just before the switch
as part of ctrl stop, but it is not enabled back after the switch. This
change keeps track of vsync before the switch and handles it
appropriately after the switch.

Change-Id: I3eed93d7f7635217bac3c19c61f68154cacef56e
Signed-off-by: default avatarHarsh Sahu <hsahu@codeaurora.org>
parent 6ffafbf3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -651,6 +651,7 @@ struct mdss_mdp_ctl {

	/* vsync handler for FRC */
	struct mdss_mdp_vsync_handler frc_vsync_handler;
	bool need_vsync_on;
};

struct mdss_mdp_mixer {
+12 −0
Original line number Diff line number Diff line
@@ -3737,12 +3737,24 @@ static int mdss_mdp_cmd_reconfigure(struct mdss_mdp_ctl *ctl,
				}
				ctl->switch_with_handoff = false;
			}
			/*
			 * keep track of vsync, so it can be enabled as part
			 * of the post switch sequence
			 */
			if (ctl->vsync_handler.enabled)
				ctl->need_vsync_on = true;

			mdss_mdp_ctl_stop(ctl, MDSS_PANEL_POWER_OFF);
			mdss_mdp_ctl_intf_event(ctl,
				MDSS_EVENT_DSI_DYNAMIC_SWITCH,
				(void *) mode, CTL_INTF_EVENT_FLAG_DEFAULT);
		} else {
			if (ctl->need_vsync_on &&
					ctl->ops.add_vsync_handler) {
				ctl->ops.add_vsync_handler(ctl,
						&ctl->vsync_handler);
				ctl->need_vsync_on = false;
			}
			mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
		}
	}