ec/google/chromeec: Call wait_for_dp_hpd only in AP mode entry

Wait for DP/HPD flags only in AP initiated mode entry

BUG=b:247670186
TEST=Verify display over TCSS and its impact on boot time for
google/rex

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: I5137c346fbf1edabc60a53e0978e32f54885c330
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76369
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kapil Porwal 2023-07-10 11:31:59 +00:00 committed by Subrata Banik
parent 9a127bf2d1
commit 1d85464df8

View File

@ -1388,6 +1388,16 @@ int google_chromeec_wait_for_dp_hpd(int port, long timeout_ms)
uint8_t mux_flags;
struct stopwatch sw;
if (!google_chromeec_check_feature(EC_FEATURE_TYPEC_REQUIRE_AP_MODE_ENTRY)) {
google_chromeec_usb_get_pd_mux_info(port, &mux_flags);
if (!(mux_flags & USB_PD_MUX_HPD_LVL) || !(mux_flags & USB_PD_MUX_DP_ENABLED)) {
printk(BIOS_WARNING, "DP/HPD not ready. Abort.\n");
return -1;
}
return 0;
}
stopwatch_init_msecs_expire(&sw, timeout_ms);
do {
google_chromeec_usb_get_pd_mux_info(port, &mux_flags);