summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPi-Hsun Shih <pihsun@chromium.org>2019-08-08 15:22:59 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-12 08:10:02 +0000
commitc090c1101c7d1c87ee706d67be29d74eae9f541e (patch)
treeb2164d5c1d54b0c6c6fecf7e70ec76fcfccf8165
parent890e06949e382175954bd82a84586c69c0d77a57 (diff)
downloadchrome-ec-c090c1101c7d1c87ee706d67be29d74eae9f541e.tar.gz
kukui: 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. This is basically applying CL:1422458 to kukui. BUG=b:138696135 BRANCH=none TEST=manually Change-Id: I53e6d96a54dc45910055a7d535bf89477ce87430 Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1743906 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--baseboard/kukui/usb_pd_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/baseboard/kukui/usb_pd_policy.c b/baseboard/kukui/usb_pd_policy.c
index 54f4db0836..95ed4290b7 100644
--- a/baseboard/kukui/usb_pd_policy.c
+++ b/baseboard/kukui/usb_pd_policy.c
@@ -364,7 +364,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 {