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: Zhao, Yuan <yzhao@codeaurora.org>
This commit is contained in:
Zhao, Yuan
2020-09-08 16:58:35 +08:00
zatwierdzone przez Gerrit - the friendly Code Review server
rodzic 6d59f959d3
commit 7605176062

Wyświetl plik

@@ -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;