diff options
author | Scott Collyer <scollyer@google.com> | 2021-02-12 01:01:54 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-01 22:02:09 +0000 |
commit | 7147a7339def8f11d0db68e65a61ed2896fb0ee2 (patch) | |
tree | e7c787bdeedbbeb332963e3ea617f3b305657d25 /include | |
parent | b37024ccf7da7ab5dbdbf15d3478f69bf4deb879 (diff) | |
download | chrome-ec-7147a7339def8f11d0db68e65a61ed2896fb0ee2.tar.gz |
TCPMv2: DPM: Add support for sending SVDM Attention message
This CL adds a new DPM function to generate a request to the PE to
send a SVDM Attention message via the DPM. This change deprecates
pd_send_hpd from TCPMv2, which existed for the same
purpose. pd_send_hpd is now part of the hpd->DP Attention converter.
This path replaces the need to use pd_send_vdm which can't be reliably
used with its current design.
BUG=b:175660576,b:180465870
BRANCH=None
TEST=Verified on quiche that can enter ALT-DP mode as a UFP-D and that
display is extended properly via display port or hdmi connector.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I9f8817cb8d40f32b878abdc09db605097a32548b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691969
Tested-by: Keith Short <keithshort@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 852dcf35a9..38f187660c 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -2074,6 +2074,23 @@ struct partner_active_modes *pd_get_partner_active_modes(int port, enum tcpm_transmit_type type); /* + * Sets the current object position for DP alt-mode + * Note: opos == 0 means the mode is not active + * + * @param port USB-C port number + * @param opos Object position for DP alternate mode + */ +void pd_ufp_set_dp_opos(int port, int opos); + +/* + * Gets the current object position for DP alt-mode + * + * @param port USB-C port number + * @return Alt-DP object position value for the given port + */ +int pd_ufp_get_dp_opos(int port); + +/* * Returns True if cable supports USB2 connection * * @param port USB-C port number @@ -2684,6 +2701,20 @@ void pd_notify_event(int port, uint32_t event_mask); void pd_clear_events(int port, uint32_t clear_mask); /* + * Requests a VDM Attention message be sent. Attention is the only SVDM message + * that does not result in a response from the port partner. In addition, if + * it's a DP Attention message, then it will be requested from outside of the + * port's PD task. + * + * @param port USB-C port number + * @param *data pointer to the VDM Attention message + * @param vdo_count number of VDOs (must be 1 or 2) + * @return EC_RES_SUCCESS if a VDM message is scheduled. + */ +enum ec_status pd_request_vdm_attention(int port, const uint32_t *data, + int vdo_count); + +/* * Requests that the port enter the specified mode. A successful result just * means that the request was received, not that the mode has been entered yet. * |