disp: msm: sde: set watchdog TE when panel fails ESD check
In the event of panel dead scenario, it is possible to receive a mode set call before the panel has recovered. When this happens, display should select watchdog TE as the vsync source. Similarly when detecting a write pointer timeout, if the panel is dead then watchdog TE should be or has already been configured and display should not make a change to this vsync selection. Change-Id: I732c75e54d734b00889151b914b0749ae1f27d08 Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This commit is contained in:
@@ -1315,6 +1315,7 @@ static void _sde_encoder_update_vsync_source(struct sde_encoder_virt *sde_enc,
|
|||||||
struct msm_display_info *disp_info)
|
struct msm_display_info *disp_info)
|
||||||
{
|
{
|
||||||
struct sde_encoder_phys *phys;
|
struct sde_encoder_phys *phys;
|
||||||
|
struct sde_connector *sde_conn;
|
||||||
int i;
|
int i;
|
||||||
u32 vsync_source;
|
u32 vsync_source;
|
||||||
|
|
||||||
@@ -1329,8 +1330,10 @@ static void _sde_encoder_update_vsync_source(struct sde_encoder_virt *sde_enc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sde_conn = to_sde_connector(sde_enc->cur_master->connector);
|
||||||
|
|
||||||
if (sde_encoder_check_curr_mode(&sde_enc->base, MSM_DISPLAY_CMD_MODE)) {
|
if (sde_encoder_check_curr_mode(&sde_enc->base, MSM_DISPLAY_CMD_MODE)) {
|
||||||
if (disp_info->is_te_using_watchdog_timer)
|
if (disp_info->is_te_using_watchdog_timer || sde_conn->panel_dead)
|
||||||
vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_4 + sde_enc->te_source;
|
vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_4 + sde_enc->te_source;
|
||||||
else
|
else
|
||||||
vsync_source = sde_enc->te_source;
|
vsync_source = sde_enc->te_source;
|
||||||
|
@@ -1521,7 +1521,10 @@ static int _sde_encoder_phys_cmd_handle_wr_ptr_timeout(
|
|||||||
|
|
||||||
SDE_EVT32(DRMID(phys_enc->parent), switch_te, SDE_EVTLOG_FUNC_ENTRY);
|
SDE_EVT32(DRMID(phys_enc->parent), switch_te, SDE_EVTLOG_FUNC_ENTRY);
|
||||||
|
|
||||||
if (switch_te) {
|
if (sde_connector_esd_status(phys_enc->connector)) {
|
||||||
|
/* watchdog TE already set on esd status check failure */
|
||||||
|
ret = _sde_encoder_phys_cmd_wait_for_wr_ptr(phys_enc);
|
||||||
|
} else if (switch_te) {
|
||||||
SDE_DEBUG_CMDENC(cmd_enc,
|
SDE_DEBUG_CMDENC(cmd_enc,
|
||||||
"wr_ptr_irq wait failed, retry with WD TE\n");
|
"wr_ptr_irq wait failed, retry with WD TE\n");
|
||||||
|
|
||||||
@@ -1850,6 +1853,7 @@ static void sde_encoder_phys_cmd_setup_vsync_source(struct sde_encoder_phys *phy
|
|||||||
u32 vsync_source, struct msm_display_info *disp_info)
|
u32 vsync_source, struct msm_display_info *disp_info)
|
||||||
{
|
{
|
||||||
struct sde_encoder_virt *sde_enc;
|
struct sde_encoder_virt *sde_enc;
|
||||||
|
struct sde_connector *sde_conn;
|
||||||
|
|
||||||
if (!phys_enc || !phys_enc->hw_intf)
|
if (!phys_enc || !phys_enc->hw_intf)
|
||||||
return;
|
return;
|
||||||
@@ -1858,7 +1862,9 @@ static void sde_encoder_phys_cmd_setup_vsync_source(struct sde_encoder_phys *phy
|
|||||||
if (!sde_enc)
|
if (!sde_enc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (disp_info->is_te_using_watchdog_timer &&
|
sde_conn = to_sde_connector(phys_enc->connector);
|
||||||
|
|
||||||
|
if ((disp_info->is_te_using_watchdog_timer || sde_conn->panel_dead) &&
|
||||||
phys_enc->hw_intf->ops.setup_vsync_source) {
|
phys_enc->hw_intf->ops.setup_vsync_source) {
|
||||||
vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_0;
|
vsync_source = SDE_VSYNC_SOURCE_WD_TIMER_0;
|
||||||
phys_enc->hw_intf->ops.setup_vsync_source(phys_enc->hw_intf,
|
phys_enc->hw_intf->ops.setup_vsync_source(phys_enc->hw_intf,
|
||||||
|
Reference in New Issue
Block a user