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

Commit 01abbca9 authored by Kuogee Hsieh's avatar Kuogee Hsieh
Browse files

msm: mdss: add MDSS_EVENT_LINK READY



At split display case, DSI panel initialization dcs
commands need to be sent to panel when both dsi links
are in LP-11 state. Add MDSS_EVENT_LINK_READY to have
both dsi controller's phy/pll initialized which brings
link to LP-11 state first so that panel initialization
dcs commands be received by panel successfully to bring
panel to display_on state.

Change-Id: I4b33fafd2673be1f068819bee25fc1a335eb0fe8
Signed-off-by: default avatarKuogee Hsieh <khsieh@codeaurora.org>
parent 093d9369
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1185,15 +1185,17 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
	}
	ctrl_pdata = container_of(pdata, struct mdss_dsi_ctrl_pdata,
				panel_data);
	pr_debug("%s+:event=%d\n", __func__, event);
	pr_debug("%s+: ctrl=%d event=%d\n", __func__, ctrl_pdata->ndx, event);

	MDSS_XLOG(event, arg, ctrl_pdata->ndx, 0x3333);

	switch (event) {
	case MDSS_EVENT_UNBLANK:
	case MDSS_EVENT_LINK_READY:
		rc = mdss_dsi_on(pdata);
		mdss_dsi_op_mode_config(pdata->panel_info.mipi.mode,
							pdata);
		break;
	case MDSS_EVENT_UNBLANK:
		if (ctrl_pdata->on_cmds.link_state == DSI_LP_MODE)
			rc = mdss_dsi_unblank(pdata);
		break;
+3 −0
Original line number Diff line number Diff line
@@ -734,6 +734,9 @@ int mdss_mdp_cmd_kickoff(struct mdss_mdp_ctl *ctl, void *arg)
	}

	if (__mdss_mdp_cmd_panel_power_off(ctx)) {
		rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL);
		WARN(rc, "intf %d link ready error (%d)\n", ctl->intf_num, rc);

		rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL);
		WARN(rc, "intf %d unblank error (%d)\n", ctl->intf_num, rc);

+5 −2
Original line number Diff line number Diff line
@@ -926,15 +926,18 @@ static int mdss_mdp_video_display(struct mdss_mdp_ctl *ctl, void *arg)
	MDSS_XLOG(ctl->num, ctl->underrun_cnt);

	if (!ctx->timegen_en) {
		rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL);
		rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_LINK_READY, NULL);
		if (rc) {
			pr_warn("intf #%d unblank error (%d)\n",
			pr_warn("intf #%d link ready error (%d)\n",
					ctl->intf_num, rc);
			video_vsync_irq_disable(ctl);
			ctx->wait_pending = 0;
			return rc;
		}

		rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_UNBLANK, NULL);
		WARN(rc, "intf %d unblank error (%d)\n", ctl->intf_num, rc);

		pr_debug("enabling timing gen for intf=%d\n", ctl->intf_num);

		if (pdata->panel_info.cont_splash_enabled &&
+2 −0
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ struct mdss_intf_recovery {
 * enum mdss_intf_events - Different events generated by MDP core
 *
 * @MDSS_EVENT_RESET:		MDP control path is being (re)initialized.
 * @MDSS_EVENT_LINK_READY	Interface data path inited to ready state.
 * @MDSS_EVENT_UNBLANK:		Sent before first frame update from MDP is
 *				sent to panel.
 * @MDSS_EVENT_PANEL_ON:	After first frame update from MDP.
@@ -180,6 +181,7 @@ struct mdss_intf_recovery {
 */
enum mdss_intf_events {
	MDSS_EVENT_RESET = 1,
	MDSS_EVENT_LINK_READY,
	MDSS_EVENT_UNBLANK,
	MDSS_EVENT_PANEL_ON,
	MDSS_EVENT_BLANK,