Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 179cdb1b authored by Nirmal Abraham's avatar Nirmal Abraham Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Disable ESD thread during display shutdown



During device power off, in display shutdown sequence, the
FB event notifier for poweroff doesn't get called. In this
case, disable the ESD thread before turning panel off to avoid
a race condition between ESD and shutdown flow.

Change-Id: I33a326eb1e34f24447fb193ec060c3a70d8a6954
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
parent d0f8458e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2665,6 +2665,7 @@ static int mdss_dsi_event_handler(struct mdss_panel_data *pdata,
		break;
	case MDSS_EVENT_PANEL_OFF:
		power_state = (int) (unsigned long) arg;
		disable_esd_thread();
		ctrl_pdata->ctrl_state &= ~CTRL_STATE_MDP_ACTIVE;
		if (ctrl_pdata->off_cmds.link_state == DSI_LP_MODE)
			rc = mdss_dsi_blank(pdata, power_state);
+1 −0
Original line number Diff line number Diff line
@@ -595,6 +595,7 @@ int mdss_dsi_wait_for_lane_idle(struct mdss_dsi_ctrl_pdata *ctrl);

irqreturn_t mdss_dsi_isr(int irq, void *ptr);
irqreturn_t hw_vsync_handler(int irq, void *data);
void disable_esd_thread(void);
void mdss_dsi_irq_handler_config(struct mdss_dsi_ctrl_pdata *ctrl_pdata);

void mdss_dsi_set_tx_power_mode(int mode, struct mdss_panel_data *pdata);
+10 −0
Original line number Diff line number Diff line
@@ -103,6 +103,16 @@ irqreturn_t hw_vsync_handler(int irq, void *data)
	return IRQ_HANDLED;
}

/*
 * disable_esd_thread() - Cancels work item for the esd check.
 */
void disable_esd_thread(void)
{
	if (pstatus_data &&
		cancel_delayed_work_sync(&pstatus_data->check_status))
			pr_debug("esd thread killed\n");
}

/*
 * fb_event_callback() - Call back function for the fb_register_client()
 *			 notifying events