summaryrefslogtreecommitdiff
path: root/board/nocturne/usb_pd_policy.c
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2019-01-15 20:04:38 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-19 00:13:52 -0800
commitb81b644c86f6c4d1f802cd7f132d80085d2ddc90 (patch)
treeceab4bb3680bdd106262c3a7dab50dae59b9cce3 /board/nocturne/usb_pd_policy.c
parent6d96d30de2d249527eee5bf17c80d343c378de43 (diff)
downloadchrome-ec-b81b644c86f6c4d1f802cd7f132d80085d2ddc90.tar.gz
nocturne: Check IRQ and HPD in DPStatus message.
Per the VESA DisplayPort Alt Mode on USB Type-C spec, IRQ_HPD indicates that a high to low followed by a low to high transition was detected. Therefore, we should be checking when IRQ is high and HPD is low is received as that is an error. This commit fixes that bug where were comparing our level to the GPU instead of what was shown in the PDO. BUG=none BRANCH=firmware-nocturne-10984.B TEST=Flash nocturne, plug in Apple Multiport AV USB-C adapter, verify that external display works. Change-Id: I536dd0d2556794411eb8d54a9a0c34f61fff5253 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/1422458 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Benson Leung <bleung@google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit 3ed2914348316dd04a4eede7d2f7b1ce0f9434b1) Reviewed-on: https://chromium-review.googlesource.com/1422460 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/nocturne/usb_pd_policy.c')
-rw-r--r--board/nocturne/usb_pd_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/board/nocturne/usb_pd_policy.c b/board/nocturne/usb_pd_policy.c
index 3956fc85ab..0d264ce896 100644
--- a/board/nocturne/usb_pd_policy.c
+++ b/board/nocturne/usb_pd_policy.c
@@ -362,7 +362,7 @@ static int svdm_dp_attention(int port, uint32_t *payload)
/* set the minimum time delay (2ms) for the next HPD IRQ */
hpd_deadline[port] = get_time().val + HPD_USTREAM_DEBOUNCE_LVL;
- } else if (irq & !cur_lvl) {
+ } else if (irq & !lvl) {
CPRINTF("ERR:HPD:IRQ&LOW\n");
return 0; /* nak */
} else {