summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-08-13 09:36:40 +0800
committerCommit Bot <commit-bot@chromium.org>2021-08-16 02:56:54 +0000
commitb1e287f83f45e9b8217b7249c335369e1a3e873c (patch)
tree035f1a8819aa5ca1a4a73b3bcf81319c57a64ca8
parente36481d3e0da6f2e9ff792a10f6ba8bf75ed7bad (diff)
downloadchrome-ec-b1e287f83f45e9b8217b7249c335369e1a3e873c.tar.gz
usbpd: do not enter DP mode in S5->S3 transition
If DUTs enter mode in S5->S3, and the mux would be re-configured after in S3 and make the DP alt mode not correctly function. BUG=b:194031794 TEST=plug DP dongle in S5/G3 on Asurada, boot to S0, and see display BRANCH=asurada Change-Id: Iee0ea2549e68ca7effc8cc538c22f4d388f10943 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093347 Reviewed-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Commit-Queue: Eric Yilun Lin <yllin@google.com>
-rw-r--r--common/usb_pd_alt_mode_dfp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c
index 9f26bfedcd..3c43b847d6 100644
--- a/common/usb_pd_alt_mode_dfp.c
+++ b/common/usb_pd_alt_mode_dfp.c
@@ -1169,10 +1169,11 @@ __overridable int svdm_enter_dp_mode(int port, uint32_t mode_caps)
* if we don't need to maintain HPD connectivity info in a low power
* mode, then we shall exit DP Alt Mode. (This is why we don't enter
* when the SoC is off as opposed to suspend where adding a display
- * could cause a wake up.)
+ * could cause a wake up.) When in S5->S3 transition state, we
+ * should treat it as a SoC off state.
*/
#ifdef HAS_TASK_CHIPSET
- if (chipset_in_state(CHIPSET_STATE_ANY_OFF))
+ if (!chipset_in_state(CHIPSET_STATE_ANY_SUSPEND | CHIPSET_STATE_ON))
return -1;
#endif