|
@@ -3889,6 +3889,17 @@ int dsi_panel_set_lp1(struct dsi_panel *panel)
|
|
if (!panel->panel_initialized)
|
|
if (!panel->panel_initialized)
|
|
goto exit;
|
|
goto exit;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Consider LP1->LP2->LP1.
|
|
|
|
+ * If the panel is already in LP mode, do not need to
|
|
|
|
+ * set the regulator.
|
|
|
|
+ * IBB and AB power mode would be set at the same time
|
|
|
|
+ * in PMIC driver, so we only call ibb setting that is enough.
|
|
|
|
+ */
|
|
|
|
+ if (dsi_panel_is_type_oled(panel) &&
|
|
|
|
+ panel->power_mode != SDE_MODE_DPMS_LP2)
|
|
|
|
+ dsi_pwr_panel_regulator_mode_set(&panel->power_info,
|
|
|
|
+ "ibb", REGULATOR_MODE_IDLE);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_LP1);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_LP1);
|
|
if (rc)
|
|
if (rc)
|
|
DSI_ERR("[%s] failed to send DSI_CMD_SET_LP1 cmd, rc=%d\n",
|
|
DSI_ERR("[%s] failed to send DSI_CMD_SET_LP1 cmd, rc=%d\n",
|
|
@@ -3933,6 +3944,13 @@ int dsi_panel_set_nolp(struct dsi_panel *panel)
|
|
if (!panel->panel_initialized)
|
|
if (!panel->panel_initialized)
|
|
goto exit;
|
|
goto exit;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Consider about LP1->LP2->NOLP.
|
|
|
|
+ */
|
|
|
|
+ if (dsi_panel_is_type_oled(panel) &&
|
|
|
|
+ (panel->power_mode == SDE_MODE_DPMS_LP2))
|
|
|
|
+ dsi_pwr_panel_regulator_mode_set(&panel->power_info,
|
|
|
|
+ "ibb", REGULATOR_MODE_NORMAL);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_NOLP);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_NOLP);
|
|
if (rc)
|
|
if (rc)
|
|
DSI_ERR("[%s] failed to send DSI_CMD_SET_NOLP cmd, rc=%d\n",
|
|
DSI_ERR("[%s] failed to send DSI_CMD_SET_NOLP cmd, rc=%d\n",
|
|
@@ -4333,6 +4351,15 @@ int dsi_panel_disable(struct dsi_panel *panel)
|
|
|
|
|
|
/* Avoid sending panel off commands when ESD recovery is underway */
|
|
/* Avoid sending panel off commands when ESD recovery is underway */
|
|
if (!atomic_read(&panel->esd_recovery_pending)) {
|
|
if (!atomic_read(&panel->esd_recovery_pending)) {
|
|
|
|
+ /*
|
|
|
|
+ * Need to set IBB/AB regulator mode to STANDBY,
|
|
|
|
+ * if panel is going off from AOD mode.
|
|
|
|
+ */
|
|
|
|
+ if (dsi_panel_is_type_oled(panel) &&
|
|
|
|
+ (panel->power_mode == SDE_MODE_DPMS_LP1 ||
|
|
|
|
+ panel->power_mode == SDE_MODE_DPMS_LP2))
|
|
|
|
+ dsi_pwr_panel_regulator_mode_set(&panel->power_info,
|
|
|
|
+ "ibb", REGULATOR_MODE_STANDBY);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_OFF);
|
|
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_OFF);
|
|
if (rc) {
|
|
if (rc) {
|
|
/*
|
|
/*
|
|
@@ -4347,6 +4374,7 @@ int dsi_panel_disable(struct dsi_panel *panel)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
panel->panel_initialized = false;
|
|
panel->panel_initialized = false;
|
|
|
|
+ panel->power_mode = SDE_MODE_DPMS_OFF;
|
|
|
|
|
|
mutex_unlock(&panel->panel_lock);
|
|
mutex_unlock(&panel->panel_lock);
|
|
return rc;
|
|
return rc;
|