summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2019-03-18 16:56:17 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 04:42:45 -0700
commit8cc25cc66ef058238548152d71e35044276f00f6 (patch)
tree60a456413bad7343c3e0d4608c99228c182a3131
parent40eba6b0cabb0502f71ade0d44b339122709c777 (diff)
downloadchrome-ec-8cc25cc66ef058238548152d71e35044276f00f6.tar.gz
grunt: 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=chromium:920877 BRANCH=grunt TEST=DP still works with dock and DP-only dongles. Change-Id: If23bcc94951ca8c40efc35098e05ed2b5f3371d2 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1530129 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--baseboard/grunt/usb_pd_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/baseboard/grunt/usb_pd_policy.c b/baseboard/grunt/usb_pd_policy.c
index 63e5268668..ab15a03172 100644
--- a/baseboard/grunt/usb_pd_policy.c
+++ b/baseboard/grunt/usb_pd_policy.c
@@ -358,7 +358,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) {
/*
* IRQ can only be generated when the level is high, because
* the IRQ is signaled by a short low pulse from the high level.