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

Commit ed46341a 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: avoid flickering by configuring both dsi ctrl at same time"

parents bf0c00ee 03a28edc
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -911,6 +911,7 @@ static int mdss_dsi_dfps_config(struct mdss_panel_data *pdata, int new_fps)
	int rc = 0;
	struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
	struct mdss_dsi_ctrl_pdata *sctrl_pdata = NULL;
	struct mdss_panel_info *pinfo;

	pr_debug("%s+:\n", __func__);

@@ -929,15 +930,19 @@ static int mdss_dsi_dfps_config(struct mdss_panel_data *pdata, int new_fps)
	}

	/*
	 * DFPS registers were already programmed while programming
	 * the first controller(DSI0). Ignore DSI1 reguest.
	 * at split display case, DFPS registers were already programmed
	 * while programming the left ctrl(DSI0). Ignore right ctrl (DSI1)
	 * reguest.
	 */
	if (mdss_dsi_is_slave_ctrl(ctrl_pdata)) {
	pinfo = &pdata->panel_info;
	if (pinfo->is_split_display) {
		if (mdss_dsi_is_right_ctrl(ctrl_pdata)) {
			pr_debug("%s DFPS already updated.\n", __func__);
			return rc;
		}

	sctrl_pdata = mdss_dsi_get_slave_ctrl();
		/* left ctrl to get right ctrl */
		sctrl_pdata = mdss_dsi_get_other_ctrl(ctrl_pdata);
	}

	if (new_fps !=
		ctrl_pdata->panel_data.panel_info.mipi.frame_rate) {
+19 −0
Original line number Diff line number Diff line
@@ -481,6 +481,25 @@ static inline bool mdss_dsi_is_slave_ctrl(struct mdss_dsi_ctrl_pdata *ctrl)
		(ctrl->ndx == DSI_CTRL_SLAVE);
}

static inline bool mdss_dsi_is_left_ctrl(struct mdss_dsi_ctrl_pdata *ctrl)
{
	return ctrl->ndx == DSI_CTRL_LEFT;
}

static inline bool mdss_dsi_is_right_ctrl(struct mdss_dsi_ctrl_pdata *ctrl)
{
	return ctrl->ndx == DSI_CTRL_RIGHT;
}

static inline struct mdss_dsi_ctrl_pdata *mdss_dsi_get_other_ctrl(
					struct mdss_dsi_ctrl_pdata *ctrl)
{
	if (ctrl->ndx == DSI_CTRL_RIGHT)
		return ctrl_list[DSI_CTRL_LEFT];

	return ctrl_list[DSI_CTRL_RIGHT];
}

static inline struct mdss_dsi_ctrl_pdata *mdss_dsi_get_ctrl_by_index(int ndx)
{
	if (ndx >= DSI_CTRL_MAX)
+6 −0
Original line number Diff line number Diff line
@@ -2030,6 +2030,12 @@ int mdss_mdp_ctl_start(struct mdss_mdp_ctl *ctl, bool handoff)

	sctl = mdss_mdp_get_split_ctl(ctl);

	if (sctl) {
		/* split display */
		ctl->panel_data->panel_info.is_split_display = true;
		sctl->panel_data->panel_info.is_split_display = true;
	}

	mutex_lock(&ctl->lock);

	/*
+1 −0
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ struct mdss_panel_info {
	uint32_t panel_dead;
	bool dynamic_switch_pending;
	bool is_lpm_mode;
	bool is_split_display;

	struct mdss_mdp_pp_tear_check te;