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

Commit 76051760 authored by Zhao, Yuan's avatar Zhao, Yuan Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dp: do not skip disconnect when host is unready



usbpd_attention_cb will do dp_display_disconnect_sync, but will
not deinit dp host. usbpd_disconnect_cb can deinit dp host, so
need to check dp state, if dp is unready, should not skip
usbpd_disconnect, can deinit dp host now.

Change-Id: I5a149923ecb043b3a7db973e092bd0d49a715981
Signed-off-by: default avatarZhao, Yuan <yzhao@codeaurora.org>
parent 6d59f959
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1358,7 +1358,8 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)
			dp->debug->psm_enabled);

	/* skip if a disconnect is already in progress */
	if (dp_display_state_is(DP_STATE_ABORTED)) {
	if (dp_display_state_is(DP_STATE_ABORTED) &&
	    dp_display_state_is(DP_STATE_READY)) {
		DP_DEBUG("disconnect already in progress\n");
		SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_CASE1, dp->state);
		return 0;