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

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

Merge "msm: mdss: wait for vsync before updating fps dynamically"

parents 27b26a46 d09bd571
Loading
Loading
Loading
Loading
+18 −21
Original line number Original line 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
	if (pdata->panel_info.dfps_update
			!= DFPS_SUSPEND_RESUME_MODE) {
			!= 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) {
		if (!ctx->timegen_en) {
			pr_err("TG is OFF. DFPS mode invalid\n");
			pr_err("TG is OFF. DFPS mode invalid\n");
			return -EINVAL;
			return -EINVAL;
@@ -933,6 +917,19 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl,
			return rc;
			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);
			mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_ON);
			spin_lock_irqsave(&ctx->dfps_lock, flags);
			spin_lock_irqsave(&ctx->dfps_lock, flags);