summaryrefslogtreecommitdiff
path: root/msm/dsi
diff options
context:
space:
mode:
Diffstat (limited to 'msm/dsi')
-rw-r--r--msm/dsi/dsi_drm.c12
-rw-r--r--msm/dsi/dsi_panel.c43
-rw-r--r--msm/dsi/dsi_panel.h1
3 files changed, 39 insertions, 17 deletions
diff --git a/msm/dsi/dsi_drm.c b/msm/dsi/dsi_drm.c
index 33a2f508..7ee15865 100644
--- a/msm/dsi/dsi_drm.c
+++ b/msm/dsi/dsi_drm.c
@@ -9,6 +9,7 @@
#include <drm/drm_atomic.h>
#include "msm_kms.h"
+#include "nanohub_exports.h"
#include "sde_connector.h"
#include "dsi_drm.h"
#include "sde_trace.h"
@@ -180,6 +181,7 @@ static int dsi_bridge_attach(struct drm_bridge *bridge,
static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
{
int rc = 0;
+ bool skip_panel_on_seq_check_enabled = false;
struct dsi_bridge *c_bridge = to_dsi_bridge(bridge);
if (!bridge) {
@@ -192,6 +194,9 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
return;
}
+ if (!atomic_read(&c_bridge->display->panel->esd_recovery_pending))
+ skip_panel_on_seq_check_enabled = true;
+
atomic_set(&c_bridge->display->panel->esd_recovery_pending, 0);
/* By this point mode should have been validated through mode_fixup */
@@ -210,6 +215,13 @@ static void dsi_bridge_pre_enable(struct drm_bridge *bridge)
return;
}
+ c_bridge->display->panel->skip_panel_on_from_off = false;
+ if (skip_panel_on_seq_check_enabled)
+ if (nanohub_query_display_state_no_check() == MCU_DISPLAY_ON) {
+ DSI_INFO("skip panel on\n");
+ c_bridge->display->panel->skip_panel_on_from_off = true;
+ }
+
SDE_ATRACE_BEGIN("dsi_display_prepare");
rc = dsi_display_prepare(c_bridge->display);
if (rc) {
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;
diff --git a/msm/dsi/dsi_panel.h b/msm/dsi/dsi_panel.h
index 5e97d8aa..423e167c 100644
--- a/msm/dsi/dsi_panel.h
+++ b/msm/dsi/dsi_panel.h
@@ -263,6 +263,7 @@ struct dsi_panel {
bool is_twm_en;
bool skip_panel_off;
+ bool skip_panel_on_from_off;
bool panel_initialized;
bool te_using_watchdog_timer;
struct dsi_qsync_capabilities qsync_caps;