summaryrefslogtreecommitdiff
path: root/msm/dsi/dsi_panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'msm/dsi/dsi_panel.c')
-rw-r--r--msm/dsi/dsi_panel.c43
1 files changed, 26 insertions, 17 deletions
diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c
index 05b6190b..3202b126 100644
--- a/msm/dsi/dsi_panel.c
+++ b/msm/dsi/dsi_panel.c
@@ -277,6 +277,9 @@ static int dsi_panel_reset(struct dsi_panel *panel)
}
}
+ if (panel->skip_panel_on_from_off)
+ goto exit;
+
if (r_config->count) {
rc = gpio_direction_output(r_config->reset_gpio,
r_config->sequence[0].level);
@@ -4907,26 +4910,28 @@ int dsi_panel_enable(struct dsi_panel *panel)
mutex_lock(&panel->panel_lock);
- rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_ON);
- if (rc) {
- DSI_ERR("[%s] failed to send DSI_CMD_SET_ON cmds, rc=%d\n",
- panel->name, rc);
- goto error;
- }
-
- if (panel->panel_mode == DSI_OP_CMD_MODE) {
- rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_CMD_ON);
+ if (!panel->skip_panel_on_from_off) {
+ rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_ON);
if (rc) {
- DSI_ERR("[%s] failed to send DSI_CMD_SET_CMD_ON cmds, rc=%d\n",
- panel->name, rc);
+ DSI_ERR("[%s] failed to send DSI_CMD_SET_ON cmds, rc=%d\n", panel->name,
+ rc);
goto error;
}
- } else if (panel->panel_mode == DSI_OP_VIDEO_MODE) {
- rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_VID_ON);
- if (rc) {
- DSI_ERR("[%s] failed to send DSI_CMD_SET_VID_ON cmds, rc=%d\n",
- panel->name, rc);
- goto error;
+
+ if (panel->panel_mode == DSI_OP_CMD_MODE) {
+ rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_CMD_ON);
+ if (rc) {
+ DSI_ERR("[%s] failed to send DSI_CMD_SET_CMD_ON cmds, rc=%d\n",
+ panel->name, rc);
+ goto error;
+ }
+ } else if (panel->panel_mode == DSI_OP_VIDEO_MODE) {
+ rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_VID_ON);
+ if (rc) {
+ DSI_ERR("[%s] failed to send DSI_CMD_SET_VID_ON cmds, rc=%d\n",
+ panel->name, rc);
+ goto error;
+ }
}
}
panel->panel_initialized = true;
@@ -4945,6 +4950,9 @@ int dsi_panel_post_enable(struct dsi_panel *panel)
return -EINVAL;
}
+ if (panel->skip_panel_on_from_off)
+ return 0;
+
mutex_lock(&panel->panel_lock);
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_SET_POST_ON);
@@ -4953,6 +4961,7 @@ int dsi_panel_post_enable(struct dsi_panel *panel)
panel->name, rc);
goto error;
}
+
error:
mutex_unlock(&panel->panel_lock);
return rc;