disp: msm: dsi: Raise BUG for continous panel recovery failure

After the ESD detection and recovery keep trying to recover panel, but
after 5 times, unsuccessfully recovery the panel, then cal BUG to reboot
the phone.

Port from: c3d7c03

Change-Id: I595027afdbb7934b63d2f41c151277a9c48b5e21
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1697290
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shuo Yan <shuoyan@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Bang Nguyen 2019-07-31 08:25:45 -05:00 • committed by tongkun1
commit f4490c44a2

View file

@ -4829,6 +4829,7 @@ int dsi_panel_enable(struct dsi_panel *panel)
{
int rc = 0;
u8 pwr_mode;
static int panel_recovery_retry;
if (!panel) {
DSI_ERR("Invalid params\n");
@ -4856,9 +4857,19 @@ int dsi_panel_enable(struct dsi_panel *panel)
if (pwr_mode != panel->disp_on_chk_val) {
DSI_ERR("%s: Read Pwr_mode=0%x is not matched with expected value =0x%x\n",
__func__, pwr_mode, panel->disp_on_chk_val);
if (panel_recovery_retry++ > 5) {
DSI_ERR("%s: panel recovery failed for all retries",
__func__);
BUG();
}
dsi_panel_trigger_panel_dead_event(panel);
} else
} else {
DSI_INFO("-. Pwr_mode(0x0A) = 0x%x\n", pwr_mode);
panel_recovery_retry = 0;
}
} else
DSI_INFO("-: no_panel_on_read_support is set\n");