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

Commit e310e09d 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: Enable dynamic FPS support for msmcobalt"

parents 24e4e5e7 abc9f3c7
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -1951,6 +1951,9 @@ static void __mdss_dsi_update_video_mode_total(struct mdss_panel_data *pdata,
		return;
	}

	if (ctrl_pdata->timing_db_mode)
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x1e8, 0x1);

	vsync_period =
		mdss_panel_get_vtotal(&pdata->panel_info);
	hsync_period =
@@ -1960,23 +1963,13 @@ static void __mdss_dsi_update_video_mode_total(struct mdss_panel_data *pdata,
	new_dsi_v_total =
		((vsync_period - 1) << 16) | (hsync_period - 1);

	MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C,
			(current_dsi_v_total | 0x8000000));
	if (new_dsi_v_total & 0x8000000) {
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C,
				new_dsi_v_total);
	} else {
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C,
				(new_dsi_v_total | 0x8000000));
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C,
				(new_dsi_v_total & 0x7ffffff));
	}
	MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x2C, new_dsi_v_total);

	if (ctrl_pdata->timing_db_mode)
		MIPI_OUTP((ctrl_pdata->ctrl_base) + 0x1e4, 0x1);

	pr_debug("%s new_fps:%d vsync:%d hsync:%d frame_rate:%d\n",
			__func__, new_fps, vsync_period, hsync_period,
	pr_debug("%s new_fps:%d new_vtotal:0x%X cur_vtotal:0x%X frame_rate:%d\n",
			__func__, new_fps, new_dsi_v_total, current_dsi_v_total,
			ctrl_pdata->panel_data.panel_info.mipi.frame_rate);

	ctrl_pdata->panel_data.panel_info.current_fps = new_fps;
+8 −10
Original line number Diff line number Diff line
@@ -1203,17 +1203,8 @@ static int mdss_mdp_video_vfp_fps_update(struct mdss_mdp_video_ctx *ctx,
		MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0);
	new_vsync_period_f0 = (vsync_period * hsync_period);

	mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0,
			current_vsync_period_f0 | 0x800000);
	if (new_vsync_period_f0 & 0x800000) {
	mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0,
			new_vsync_period_f0);
	} else {
		mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0,
			new_vsync_period_f0 | 0x800000);
		mdp_video_write(ctx, MDSS_MDP_REG_INTF_VSYNC_PERIOD_F0,
			new_vsync_period_f0 & 0x7fffff);
	}

	pr_debug("if:%d vtotal:%d htotal:%d f0:0x%x nw_f0:0x%x\n",
		ctx->intf_num, vsync_period, hsync_period,
@@ -1431,6 +1422,11 @@ static int mdss_mdp_video_config_fps(struct mdss_mdp_ctl *ctl, int new_fps)
					mdss_mdp_fetch_end_config(sctx, ctl);
			}

			/*
			 * Make sure controller setting committed
			 */
			wmb();

			/*
			 * MDP INTF registers support DB on targets
			 * starting from MDP v1.5.
@@ -1743,7 +1739,9 @@ static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx,
	h_total = mdss_panel_get_htotal(pinfo, true);

	fetch_start = (v_total - pinfo->prg_fet) * h_total + 1;
	fetch_enable = BIT(31);

	fetch_enable = mdp_video_read(ctx, MDSS_MDP_REG_INTF_CONFIG);
	fetch_enable |= BIT(31);

	if (pinfo->dynamic_fps && (pinfo->dfps_update ==
			DFPS_IMMEDIATE_CLK_UPDATE_MODE))