From e53e8445a1d3db08dac4c1e9b41ec03ad662a2c5 Mon Sep 17 00:00:00 2001 From: Chandan Uddaraju Date: Mon, 17 Nov 2014 12:40:58 -0800 Subject: [PATCH] mdss: dsi: Update overflow recovery sequence for msm8994 On msm8994, implement the overflow recovery sequence for all overflow interrupts. For other targets, implement the overflow recovery sequence only when the clock lane is not present in stop state. Change-Id: If47e5cfe95a2caa204daf2ea4bae55af4a1713f9 Signed-off-by: Chandan Uddaraju --- drivers/video/fbdev/msm/mdss_dsi_host.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/msm/mdss_dsi_host.c b/drivers/video/fbdev/msm/mdss_dsi_host.c index d0f892cd6b3b..a810708f7b95 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_host.c +++ b/drivers/video/fbdev/msm/mdss_dsi_host.c @@ -1954,6 +1954,7 @@ static int dsi_event_thread(void *data) struct sched_param param; u32 todo = 0, ln_status; int ret; + u32 ctrl_rev; param.sched_priority = 16; ret = sched_setscheduler_nocheck(current, SCHED_FIFO, ¶m); @@ -2001,9 +2002,11 @@ static int dsi_event_thread(void *data) mdss_dsi_sw_reset(ctrl, true); if (todo & DSI_EV_DLNx_FIFO_OVERFLOW) { + ctrl_rev = MIPI_INP(ctrl->ctrl_base); mutex_lock(&dsi_mtx); /* - * Run the overflow recovery sequence only when + * For targets other than msm8994, + * run the overflow recovery sequence only when * data lanes are in stop state and * clock lane is not in Stop State. */ @@ -2011,6 +2014,7 @@ static int dsi_event_thread(void *data) pr_debug("%s: lane_status: 0x%x\n", __func__, ln_status); if (ctrl->recovery + && (ctrl_rev != MDSS_DSI_HW_REV_103) && (ln_status & DSI_DATA_LANES_STOP_STATE) && !(ln_status @@ -2022,6 +2026,16 @@ static int dsi_event_thread(void *data) mdss_dsi_err_intr_ctrl(ctrl, DSI_INTR_ERROR_MASK, 1); mdss_dsi_clk_ctrl(ctrl, DSI_ALL_CLKS, 0); + } else if (ctrl->recovery + && (ctrl_rev + == MDSS_DSI_HW_REV_103)) { + pr_debug("%s: Handle overflow->Rev_103\n", + __func__); + mdss_dsi_clk_ctrl(ctrl, DSI_ALL_CLKS, 1); + mdss_dsi_ctl_phy_reset(ctrl); + mdss_dsi_err_intr_ctrl(ctrl, + DSI_INTR_ERROR_MASK, 1); + mdss_dsi_clk_ctrl(ctrl, DSI_ALL_CLKS, 0); } mutex_unlock(&dsi_mtx); }