diff options
author | Aseda Aboagye <aaboagye@google.com> | 2019-06-07 15:21:18 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-11 21:20:14 +0000 |
commit | 86202bd0303c6b63d7ef44c803212687b560f13a (patch) | |
tree | 91142a80fcb7e6edf1a563cca97378dd557375cd /board/atlas | |
parent | b20056a70b8ad1f0f07dad0790aeab6dc7aa24b9 (diff) | |
download | chrome-ec-86202bd0303c6b63d7ef44c803212687b560f13a.tar.gz |
atlas: Don't enter DP Alt Mode when AP is off.
According to the DisplayPort Alt Mode on USB Type-C specification, if
the DisplayPort Source device does not need to maintain HPD connectivity
information prior to entering a low power state, the device shall exit
the DP Alternate Mode. Previously, we were always entering DP Alt Mode
regardless of the SoC state. When we are shutting the device down to S5
or G3, there's no need to monitor the HPD connectivity information.
This commit simply does not enter DP Alt Mode when the SoC is off.
BUG=chromium:927636
BRANCH=firmware-atlas-11827.B
TEST=Flash atlas, shut DUT down to S5/G3, plug in a USB-C monitor
that can also act as a Source, verify with PD analyzer that DUT does not
Enter DP Alt mode, boot system up, verify that external display works.
Change-Id: Ic465e4ecb73ba09388e3e4b665f526354bcedf6e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652609
Reviewed-by: Caveh Jalali <caveh@google.com>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/atlas')
-rw-r--r-- | board/atlas/usb_pd_policy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/atlas/usb_pd_policy.c b/board/atlas/usb_pd_policy.c index fbf1f4d299..f9e9d746a9 100644 --- a/board/atlas/usb_pd_policy.c +++ b/board/atlas/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" @@ -293,6 +294,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); |