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

Commit 03a28edc authored by Kuogee Hsieh's avatar Kuogee Hsieh
Browse files

msm: mdss: avoid flickering by configuring both dsi ctrl at same time



At DFPS, to avoid flickering at right half panel, right dsi controller
needs to be configured along with left controller at same time when split
display enabled.

Change-Id: Ibbe451bd72e9740d5902d664a5e9e73db90bba5a
Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
parent 54757847
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -1097,6 +1097,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__);

@@ -1115,15 +1116,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
@@ -478,6 +478,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
@@ -352,6 +352,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;