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

Commit d09bd571 authored by Jeevan Shriram's avatar Jeevan Shriram Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: wait for vsync before updating fps dynamically



In the current implementation, when there are continuous updates
to fps, dynamic interrupt completion may fail. To avoid the interrupt
failure, wait for the vsync before configuring dynamic refresh pll
registers and trigger.

Change-Id: Ieade09e54073db5633aaf845885888d7b2c45091
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 17a84dc1
Loading
Loading
Loading
Loading
+18 −21
Original line number Diff line number Diff line
@@ -899,22 +899,6 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl,

	if (pdata->panel_info.dfps_update
			!= DFPS_SUSPEND_RESUME_MODE) {
		if (pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_CLK_UPDATE_MODE) {
			if (!ctx->timegen_en) {
				pr_err("TG is OFF. DFPS mode invalid\n");
				return -EINVAL;
			}
			rc = mdss_mdp_ctl_intf_event(ctl,
					MDSS_EVENT_PANEL_UPDATE_FPS,
					(void *) (unsigned long) new_fps);
			WARN(rc, "intf %d panel fps update error (%d)\n",
							ctl->intf_num, rc);
		} else if (pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_PORCH_UPDATE_MODE_VFP ||
				pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_PORCH_UPDATE_MODE_HFP) {
			unsigned long flags;
		if (!ctx->timegen_en) {
			pr_err("TG is OFF. DFPS mode invalid\n");
			return -EINVAL;
@@ -933,6 +917,19 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl,
			return rc;
		}

		if (pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_CLK_UPDATE_MODE) {
			rc = mdss_mdp_ctl_intf_event(ctl,
					MDSS_EVENT_PANEL_UPDATE_FPS,
					(void *) (unsigned long) new_fps);
			WARN(rc, "intf %d panel fps update error (%d)\n",
							ctl->intf_num, rc);
		} else if (pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_PORCH_UPDATE_MODE_VFP ||
				pdata->panel_info.dfps_update
				== DFPS_IMMEDIATE_PORCH_UPDATE_MODE_HFP) {
			unsigned long flags;

			mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
			spin_lock_irqsave(&ctx->dfps_lock, flags);