disp: msm: avoid esd check during pm_suspend state

Avoid esd check during pm_suspend state because core
clock enable will fail. This change adds additional
check and also adds the clock enable failure check.

Change-Id: Ie8bfa4f74d323ff15a07fb037675f07ab942f016
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This commit is contained in:
Dhaval Patel
2019-12-27 11:53:56 -08:00
committed by Satya Rama Aditya Pinapala
parent 8fbd145c74
commit 9652f27293
2 changed files with 8 additions and 3 deletions

View File

@@ -801,7 +801,7 @@ int dsi_display_check_status(struct drm_connector *connector, void *display,
struct dsi_display *dsi_display = display; struct dsi_display *dsi_display = display;
struct dsi_panel *panel; struct dsi_panel *panel;
u32 status_mode; u32 status_mode;
int rc = 0x1; int rc = 0x1, ret;
u32 mask; u32 mask;
if (!dsi_display || !dsi_display->panel) if (!dsi_display || !dsi_display->panel)
@@ -839,8 +839,10 @@ int dsi_display_check_status(struct drm_connector *connector, void *display,
goto exit; goto exit;
} }
dsi_display_clk_ctrl(dsi_display->dsi_clk_handle, ret = dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
DSI_ALL_CLKS, DSI_CLK_ON); DSI_ALL_CLKS, DSI_CLK_ON);
if (ret)
goto release_panel_lock;
/* Mask error interrupts before attempting ESD read */ /* Mask error interrupts before attempting ESD read */
mask = BIT(DSI_FIFO_OVERFLOW) | BIT(DSI_FIFO_UNDERFLOW); mask = BIT(DSI_FIFO_OVERFLOW) | BIT(DSI_FIFO_UNDERFLOW);

View File

@@ -2167,6 +2167,7 @@ static void sde_connector_check_status_work(struct work_struct *work)
{ {
struct sde_connector *conn; struct sde_connector *conn;
int rc = 0; int rc = 0;
struct device *dev;
conn = container_of(to_delayed_work(work), conn = container_of(to_delayed_work(work),
struct sde_connector, status_work); struct sde_connector, status_work);
@@ -2176,7 +2177,9 @@ static void sde_connector_check_status_work(struct work_struct *work)
} }
mutex_lock(&conn->lock); mutex_lock(&conn->lock);
if (!conn->ops.check_status || dev = conn->base.dev->dev;
if (!conn->ops.check_status || dev->power.is_suspended ||
(conn->dpms_mode != DRM_MODE_DPMS_ON)) { (conn->dpms_mode != DRM_MODE_DPMS_ON)) {
SDE_DEBUG("dpms mode: %d\n", conn->dpms_mode); SDE_DEBUG("dpms mode: %d\n", conn->dpms_mode);
mutex_unlock(&conn->lock); mutex_unlock(&conn->lock);