From 11bb969e5daf1d53d48214148de1887e340dea43 Mon Sep 17 00:00:00 2001 From: Sankeerth Billakanti Date: Sun, 27 Sep 2020 14:55:47 +0530 Subject: [PATCH] disp: msm: dp: reset disconnect flags on cable hotplug When a physical DP sink is connected after a simulation session, the attention events from the sink are ignored. The forced_disconnect flag prevents handling of attention events when disconnect is simulated or forced. This flag does not get reset when a physical sink is connected. Certain sinks which lose link integrity after link training sequence fail to display image. This change will reset the flag so that the attention events which occur after the cable hotplug can be processed. Change-Id: Ie551ead19ecff0e93da48acc2dbb1d761c55fa20 Signed-off-by: Sankeerth Billakanti --- msm/dp/dp_altmode.c | 1 + msm/dp/dp_usbpd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/msm/dp/dp_altmode.c b/msm/dp/dp_altmode.c index a5ed2005de..4263e881b9 100644 --- a/msm/dp/dp_altmode.c +++ b/msm/dp/dp_altmode.c @@ -158,6 +158,7 @@ static int dp_altmode_notify(void *priv, void *data, size_t len) if (!altmode->connected) { altmode->connected = true; altmode->dp_altmode.base.alt_mode_cfg_done = true; + altmode->forced_disconnect = false; switch (orientation) { case 0: diff --git a/msm/dp/dp_usbpd.c b/msm/dp/dp_usbpd.c index 44cfb710af..f49df593ec 100644 --- a/msm/dp/dp_usbpd.c +++ b/msm/dp/dp_usbpd.c @@ -403,6 +403,7 @@ static void dp_usbpd_response_cb(struct usbpd_svid_handler *hdlr, u8 cmd, case DP_USBPD_VDM_CONFIGURE: pd->alt_mode |= DP_USBPD_ALT_MODE_CONFIGURE; pd->dp_usbpd.base.alt_mode_cfg_done = true; + pd->forced_disconnect = false; dp_usbpd_get_status(pd); pd->dp_usbpd.base.orientation =