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

Commit b5355526 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: mdss: add dynamic resolution switch support during handoff



Add support to handle dynamic resolution switch request during
cont-splash handoff, even before driver receives the first commit.
The cmd_panel_on is ideally called right before the first kickoff,
if the panel is not already on. Make explicit panel_cmd_on call during
reconfigure to match with the ctl_stop/ctl_start done during the
process of switching. This would make sure complete cleanup and
re-configuration of the ctl is done.

Change-Id: I98469b14284195caaf17a616137a0502e0e398cf
[veeras@codeaurora.org: Resolved conflicts in mdss_mdp.h]
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 7e0545ce
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1256,8 +1256,6 @@ static int mdss_dsi_update_panel_config(struct mdss_dsi_ctrl_pdata *ctrl_pdata,
	ctrl_pdata->panel_mode = pinfo->mipi.mode;
	mdss_panel_get_dst_fmt(pinfo->bpp, pinfo->mipi.mode,
			pinfo->mipi.pixel_packing, &(pinfo->mipi.dst_format));
	pinfo->cont_splash_enabled = 0;

	return ret;
}

+3 −0
Original line number Diff line number Diff line
@@ -443,6 +443,9 @@ struct mdss_mdp_ctl {
	u64 last_input_time;
	int pending_mode_switch;
	u16 frame_rate;

	/* dynamic resolution switch during cont-splash handoff */
	bool switch_with_handoff;
};

struct mdss_mdp_mixer {
+20 −0
Original line number Diff line number Diff line
@@ -3392,6 +3392,26 @@ static int mdss_mdp_cmd_reconfigure(struct mdss_mdp_ctl *ctl,
			 */
			mdss_mdp_cmd_dsc_reconfig(ctl);

			/*
			 * Make explicit cmd_panel_on call, when dynamic
			 * resolution switch request comes before cont-splash
			 * handoff, to match the ctl_stop/ctl_start done
			 * during the reconfiguration.
			 */
			if (ctl->switch_with_handoff) {
				struct mdss_mdp_cmd_ctx *ctx;
				struct mdss_mdp_ctl *sctl;

				ctx = (struct mdss_mdp_cmd_ctx *)
					ctl->intf_ctx[MASTER_CTX];
				if (ctx &&
				     __mdss_mdp_cmd_is_panel_power_off(ctx)) {
					sctl = mdss_mdp_get_split_ctl(ctl);
					mdss_mdp_cmd_panel_on(ctl, sctl);
				}
				ctl->switch_with_handoff = false;
			}

			mdss_mdp_ctl_stop(ctl, MDSS_PANEL_POWER_OFF);
			mdss_mdp_ctl_intf_event(ctl,
				MDSS_EVENT_DSI_DYNAMIC_SWITCH,
+8 −0
Original line number Diff line number Diff line
@@ -5433,6 +5433,7 @@ static int mdss_mdp_update_panel_info(struct msm_fb_data_type *mfd,
	int ret = 0;
	struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
	struct mdss_mdp_ctl *ctl = mdp5_data->ctl;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_panel_data *pdata;
	struct mdss_mdp_ctl *sctl;

@@ -5466,6 +5467,13 @@ static int mdss_mdp_update_panel_info(struct msm_fb_data_type *mfd,
		 */
		mdss_mdp_ctl_reconfig(ctl, pdata);

		/*
		 * Set flag when dynamic resolution switch happens before
		 * handoff of cont-splash
		 */
		if (mdata->handoff_pending)
			ctl->switch_with_handoff = true;

		sctl = mdss_mdp_get_split_ctl(ctl);
		if (sctl) {
			if (mfd->split_mode == MDP_DUAL_LM_DUAL_DISPLAY) {