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

Commit e6066e2c authored by Shashank Babu Chinta Venkata's avatar Shashank Babu Chinta Venkata
Browse files

drm/msm/dsi-staging: avoid sending panel off commands



During ESD recovery, we cannot ensure health of DSI
PHY link. Thus, sending ESD panel off commands may
subject to fail. Avoid sending panel off commands
when ESD recovery is underway.

Change-Id: I443c8b1044ad68ae3fc6e4b2a904134970ec8c18
Signed-off-by: default avatarShashank Babu Chinta Venkata <sbchin@codeaurora.org>
parent c4429baa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -654,9 +654,13 @@ static int dsi_display_status_reg_read(struct dsi_display *display)
	}
exit:
	/* mask only error interrupts */
	if (rc <= 0)
	if (rc <= 0) {
		dsi_display_mask_ctrl_error_interrupts(display);

		/* Handle Panel failures during display disable sequence */
		display->panel->esd_recovery_pending = true;
	}

	dsi_display_cmd_engine_disable(display);
done:
	return rc;
+5 −1
Original line number Diff line number Diff line
@@ -151,8 +151,12 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
		return;
	}

	if (!c_bridge || !c_bridge->display)
	if (!c_bridge || !c_bridge->display || !c_bridge->display->panel) {
		pr_err("Incorrect bridge details\n");
		return;
	}

	c_bridge->display->panel->esd_recovery_pending = false;

	/* By this point mode should have been validated through mode_fixup */
	rc = dsi_display_set_mode(c_bridge->display,
+8 −5
Original line number Diff line number Diff line
@@ -3697,12 +3697,15 @@ int dsi_panel_disable(struct dsi_panel *panel)

	mutex_lock(&panel->panel_lock);

	 /* Avoid sending panel off commands when ESD recovery is underway */
	if (!panel->esd_recovery_pending) {
		rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_OFF);
		if (rc) {
			pr_err("[%s] failed to send DSI_CMD_SET_OFF cmds, rc=%d\n",
					panel->name, rc);
			goto error;
		}
	}
	panel->panel_initialized = false;

error:
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ struct dsi_panel {
	bool ulps_enabled;
	bool ulps_suspend_enabled;
	bool allow_phy_power_off;
	bool esd_recovery_pending;

	bool panel_initialized;
	bool te_using_watchdog_timer;