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>
This commit is contained in:
Daisuke Nojiri
2018-03-16 11:02:04 -07:00
committed by chrome-bot
parent fed441c689
commit b5fddbbe26

View File

@@ -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);
}