mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
disp: msm: prevent ESD recovery till all panel dead
PROPAGATED from (CR) Device reboot when CLI panel dead Quality team hopes Device still alive when one panel dead. Modify the ESD recovery policy that reboot all when all display dead. Change-Id: I78ca19de9723c00416ea43457b6750b7a765c08f Reviewed-on: https://gerrit.mot.com/1782924 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-by: Shanshan Dai <daiss1@motorola.com> Reviewed-by: Yeqing Wang <wangyq13@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
3b2c72bc4a
commit
1fd102ea73
3 changed files with 44 additions and 11 deletions
|
|
@ -6611,6 +6611,27 @@ int dsi_display_get_num_of_displays(void)
|
|||
return count;
|
||||
}
|
||||
|
||||
bool dsi_display_all_displays_dead(void)
|
||||
{
|
||||
int index =0, num_displays =0, num_dead_displays =0;
|
||||
|
||||
for (index = 0; index < MAX_DSI_ACTIVE_DISPLAY; index++) {
|
||||
struct dsi_display *display = boot_displays[index].disp;
|
||||
|
||||
if (display && display->panel_node) {
|
||||
num_displays++;
|
||||
|
||||
if (display->panel->is_panel_dead)
|
||||
num_dead_displays++;
|
||||
}
|
||||
}
|
||||
|
||||
pr_info("%d Display Dead(%d)\n", num_dead_displays, num_displays);
|
||||
|
||||
return num_dead_displays == num_displays;
|
||||
}
|
||||
EXPORT_SYMBOL(dsi_display_all_displays_dead);
|
||||
|
||||
int dsi_display_get_active_displays(void **display_array, u32 max_display_count)
|
||||
{
|
||||
int index = 0, count = 0;
|
||||
|
|
|
|||
|
|
@ -5462,9 +5462,7 @@ int dsi_panel_enable(struct dsi_panel *panel)
|
|||
{
|
||||
int rc = 0;
|
||||
u8 pwr_mode;
|
||||
static int panel_recovery_retry;
|
||||
struct dsi_display *dsi_display = container_of(panel->host,
|
||||
struct dsi_display, host);
|
||||
struct dsi_display *dsi_display = container_of(panel->host, struct dsi_display, host);
|
||||
|
||||
if (!panel) {
|
||||
DSI_ERR("Invalid params\n");
|
||||
|
|
@ -5490,20 +5488,29 @@ 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);
|
||||
DSI_ERR("%s: %s Read Pwr_mode=0%x is not matched with expected value =0x%x\n",
|
||||
__func__, panel->name, pwr_mode, panel->disp_on_chk_val);
|
||||
|
||||
if (panel_recovery_retry++ > 5) {
|
||||
if (panel->panel_recovery_retry++ > 5) {
|
||||
DSI_ERR("%s: panel recovery failed for all retries",
|
||||
__func__);
|
||||
|
||||
BUG();
|
||||
}
|
||||
panel->is_panel_dead = true;
|
||||
panel->esd_utag_enable = false;
|
||||
panel->no_panel_on_read_support = true;
|
||||
|
||||
dsi_display_trigger_panel_dead_event(dsi_display);
|
||||
if (dsi_display_all_displays_dead()) {
|
||||
DSI_ERR("%s:ALL panel recovery failed with 6 times,reboot\n",
|
||||
__func__);
|
||||
BUG();
|
||||
} else
|
||||
DSI_INFO("(%s)Panel dead,disable ESD recovery for it\n",
|
||||
panel->name);
|
||||
} else
|
||||
dsi_display_trigger_panel_dead_event(dsi_display);
|
||||
} else {
|
||||
DSI_INFO("Pwr_mode(0x0A) = 0x%x\n", pwr_mode);
|
||||
panel_recovery_retry = 0;
|
||||
panel->panel_recovery_retry = 0;
|
||||
}
|
||||
} else
|
||||
DSI_INFO("-: no_panel_on_read_support is set\n");
|
||||
|
|
|
|||
|
|
@ -367,8 +367,13 @@ struct dsi_panel {
|
|||
|
||||
enum touch_state tp_state;
|
||||
bool tp_state_check_enable;
|
||||
|
||||
int panel_recovery_retry;
|
||||
bool is_panel_dead;
|
||||
};
|
||||
|
||||
bool dsi_display_all_displays_dead(void);
|
||||
|
||||
static inline bool dsi_panel_ulps_feature_enabled(struct dsi_panel *panel)
|
||||
{
|
||||
return panel->ulps_feature_enabled;
|
||||
|
|
|
|||
Loading…
Reference in a new issue