summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2018-03-16 11:02:04 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-03-20 20:21:01 +0000
commit3774c1cac5600429a2403567b09b78dcf0cb75a3 (patch)
treeff9c1fddc7f975c113e98c77a46636d32665a725
parent8f4ee58a1d7e2e840d18a6d25837d437a983288b (diff)
downloadchrome-ec-3774c1cac5600429a2403567b09b78dcf0cb75a3.tar.gz
Fizz: Log DP mode entry and exit
This helps us tell whether a monitor lost picture because the EC exited the DisplayPort mode or other reason. BUG=b:75288273 BRANCH=none TEST=boot Fizz Change-Id: I2da6a27c66f03ef780a0ed6f60a597a01f248942 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/966993 Reviewed-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> (cherry picked from commit b5fddbbe26ed27f1ade7d89e6acbeebaf15b315e) Reviewed-on: https://chromium-review.googlesource.com/966892
-rw-r--r--board/fizz/usb_pd_policy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/fizz/usb_pd_policy.c b/board/fizz/usb_pd_policy.c
index 3a607c50d1..de96eaeed0 100644
--- a/board/fizz/usb_pd_policy.c
+++ b/board/fizz/usb_pd_policy.c
@@ -325,6 +325,8 @@ static int svdm_enter_dp_mode(int port, uint32_t mode_caps)
{
/* Only enter mode if device is DFP_D capable */
if (mode_caps & MODE_DP_SNK) {
+ pd_log_event(PD_EVENT_VIDEO_DP_MODE,
+ PD_LOG_PORT_SIZE(port, 0), 1, NULL);
svdm_safe_dp_mode(port);
return 0;
}
@@ -401,6 +403,8 @@ static void svdm_exit_dp_mode(int port)
{
const struct usb_mux *mux = &usb_muxes[port];
+ pd_log_event(PD_EVENT_VIDEO_DP_MODE,
+ PD_LOG_PORT_SIZE(port, 0), 0, NULL);
svdm_safe_dp_mode(port);
mux->hpd_update(port, 0, 0);
}