diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-06-20 11:08:08 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-25 23:14:58 +0000 |
commit | f38d74f09a2ff8b165304ae7cc9f81e631b5614e (patch) | |
tree | 9bd8e5700c9293ea618f8fee68fb09cbce2d615c /board/nami | |
parent | e41c34de74fbf1a50fde5a9419556c7209893951 (diff) | |
download | chrome-ec-f38d74f09a2ff8b165304ae7cc9f81e631b5614e.tar.gz |
Nami: Don't enter DP Alt Mode when AP is off.
Copied from CL:1652609.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/130617222
BRANCH=nami
TEST=build
Change-Id: I592c52311a8de3ef0947cbcad295fa1d6aab1a11
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1669872
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
(cherry picked from commit 7b81c0ac3b0c046b271f64cd276c2562406ebaeb)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1674047
(cherry picked from commit ba1d10a7586dbacd33a7c101a2a2404c237a79e0)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1881748
Diffstat (limited to 'board/nami')
-rw-r--r-- | board/nami/usb_pd_policy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/nami/usb_pd_policy.c b/board/nami/usb_pd_policy.c index 214dc226d9..65baa5b6cf 100644 --- a/board/nami/usb_pd_policy.c +++ b/board/nami/usb_pd_policy.c @@ -6,6 +6,7 @@ #include "atomic.h" #include "extpower.h" #include "charge_manager.h" +#include "chipset.h" #include "common.h" #include "console.h" #include "driver/tcpm/ps8xxx.h" @@ -284,6 +285,21 @@ static void svdm_safe_dp_mode(int port) static int svdm_enter_dp_mode(int port, uint32_t mode_caps) { + /* + * Don't enter the mode if the SoC is off. + * + * There's no need to enter the mode while the SoC is off; we'll + * actually enter the mode on the chipset resume hook. Entering DP Alt + * Mode twice will confuse some monitors and require and unplug/replug + * to get them to work again. The DP Alt Mode on USB-C spec says that + * 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.) + */ + if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) + return -1; + /* Only enter mode if device is DFP_D capable */ if (mode_caps & MODE_DP_SNK) { svdm_safe_dp_mode(port); |