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

Commit ccf418d0 authored by Narender Ankam's avatar Narender Ankam
Browse files

msm: mdss: dp: fix wdog_bite while disconnecting DP cable



As a corner case, if DISCONNECT_IRQ_HPD event is timedout and
now if cable is disconnected and userspace triggers BLANK call
at the same time, dp core may be turned off before trying to
put it in IDLE state. Add changes to avoid this un-clocked
register access.

Change-Id: I3511443a3be4d3b70f5e68b31234b682e475ebdf
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent a5665f16
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -2115,6 +2115,12 @@ static int mdss_dp_notify_clients(struct mdss_dp_drv_pdata *dp,
		if (dp->hpd_notification_status == NOTIFY_UNKNOWN)
			goto invalid_request;
		if (dp->hpd_notification_status == NOTIFY_DISCONNECT_IRQ_HPD) {
			/*
			 * Just in case if NOTIFY_DISCONNECT_IRQ_HPD is timedout
			 */
			if (dp->power_on)
				mdss_dp_state_ctrl(&dp->ctrl_io, ST_PUSH_IDLE);

			/*
			 * user modules already turned off. Need to explicitly
			 * turn off DP core here.
@@ -2996,6 +3002,12 @@ static void mdss_dp_mainlink_push_idle(struct mdss_panel_data *pdata)
	/* wait until link training is completed */
	mutex_lock(&dp_drv->train_mutex);

	if (!dp_drv->power_on) {
		pr_err("DP Controller not powered on\n");
		mutex_unlock(&dp_drv->train_mutex);
		return;
	}

	reinit_completion(&dp_drv->idle_comp);
	mdss_dp_state_ctrl(&dp_drv->ctrl_io, ST_PUSH_IDLE);
	if (!wait_for_completion_timeout(&dp_drv->idle_comp,