diff options
author | zhaojohn <john.zhao@intel.com> | 2022-11-16 20:37:01 -0800 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-11-19 15:09:03 +0000 |
commit | 7e0b925162201060dc49e7e46b0715151d890583 (patch) | |
tree | c4e9f73624295c2371eb29cfeaef37dfa9439f3a /src/soc | |
parent | 2b9ee5d79e1e6648436ce0ad542ed96966519b82 (diff) |
soc/intel/common: Fix the TCSS DisplayPort detection flow
After DisplayPort is plugged into type-C port, its hpd signal
instantly presents and EC has mux_info for dp and hpd. This change
fixes the DP detection flow to avoid the 1 second delay while no DP
is connected. If DP is present, there will be requests towards PMC
through the sequence of connect, safe mode, dp and hpd mode.
BUG=b:247670186
TEST=Built image and validated the DisplayPort preboot feature on Rex.
Change-Id: I7cb95ec7fcc7e1a86e86466e6d45390eedcc4531
Signed-off-by: zhaojohn <john.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69694
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/common/block/tcss/tcss.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/soc/intel/common/block/tcss/tcss.c b/src/soc/intel/common/block/tcss/tcss.c index df331c2abe..b4a5a0eff6 100644 --- a/src/soc/intel/common/block/tcss/tcss.c +++ b/src/soc/intel/common/block/tcss/tcss.c @@ -202,7 +202,6 @@ static int send_pmc_dp_hpd_request(int port, const struct usbc_mux_info *mux_dat req.buf[0] = cmd; return send_pmc_req(HPD_REQ, &req, &rsp, PMC_IPC_HPD_REQ_SIZE); - } static int send_pmc_dp_mode_request(int port, const struct usbc_mux_info *mux_data, @@ -287,7 +286,7 @@ static void tcss_init_mux(int port, const struct tcss_port_map *port_map) static void tcss_configure_dp_mode(const struct tcss_port_map *port_map, size_t num_ports) { - int ret, port_bitmask; + int ret; size_t i; const struct usbc_ops *ops; struct usbc_mux_info mux_info; @@ -300,24 +299,9 @@ static void tcss_configure_dp_mode(const struct tcss_port_map *port_map, size_t if (ops == NULL) return; - port_bitmask = ops->dp_ops.wait_for_connection(WAIT_FOR_DISPLAYPORT_TIMEOUT_MS); - if (!port_bitmask) /* No DP device is connected */ - return; - for (i = 0; i < num_ports; i++) { - if (!(port_bitmask & BIT(i))) - continue; - - ret = ops->dp_ops.enter_dp_mode(i); - if (ret < 0) - continue; - - ret = ops->dp_ops.wait_for_hpd(i, WAIT_FOR_HPD_TIMEOUT_MS); - if (ret < 0) - continue; - ret = ops->mux_ops.get_mux_info(i, &mux_info); - if (ret < 0) + if ((ret < 0) || (!mux_info.dp)) continue; port_info = &port_map[i]; |