From c090c1101c7d1c87ee706d67be29d74eae9f541e Mon Sep 17 00:00:00 2001 From: Pi-Hsun Shih Date: Thu, 8 Aug 2019 15:22:59 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1743906 Reviewed-by: Aseda Aboagye --- baseboard/kukui/usb_pd_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'baseboard') 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 { -- cgit v1.2.1