summaryrefslogtreecommitdiff
path: root/common/usb_pd_policy.c
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2015-01-07 21:18:01 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-09 05:40:13 +0000
commita2720a0f68bbadfabdacfad3411175733c0c4098 (patch)
tree989f167a05b2db5d41a21db0df1cc6f0b47e0b90 /common/usb_pd_policy.c
parentccb46f6d8e9c141f22c9d9cfe25dfcd1d433e8a4 (diff)
downloadchrome-ec-a2720a0f68bbadfabdacfad3411175733c0c4098.tar.gz
pd: Queue initial DFP HPD till after DP Config VDM.
VESA DisplayPort Alt Mode on USB Type-C Standard specifies: When DisplayPort Configuration is not selected (and the converter is driving its HPD output low), the converter shall track the current state of HPD, ready for appropriate indication when DisplayPort Configuration is subsequently selected. Not only are we violating specification here but it also causes a race between enabling DPout muxes to AUX line which in turn causes GPU to timeout trying to read EDID/DPCD on occasion. Change adds post_config function for DFPs alternate mode and in the case of DP it sets the dp_on flag there. This allows attention function to correctly defer HPD_HI that may accompany 'DP status' VDM to be queued (deferred) until such time that AUX muxes are enabled properly. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:35219 TEST=manual, using hoho & dingdong With kernel bootarg drm.debug=0x6 following cases all show these drm debug lines: [drm:i915_hotplug_work_func], Connector DP-2 (pin 5) received hotplug event. [drm:intel_dp_get_dpcd], DPCD: 12 14 c4 01 01 00 01 00 02 02 06 00 00 00 00 [drm:intel_hpd_irq_event], [CONNECTOR:38:DP-2] status updated from disconnected to connected case1: boot connected to external display case2: attach dongle to external display then samus case3: attach dongle to samus then to external display case4: connect/disconnect rapidly on type-C side case5: connect/disconnect rapidly on external display side. Change-Id: I40eab797fdd5090c8ad13fae2cd053b740d9a307 Reviewed-on: https://chromium-review.googlesource.com/239420 Trybot-Ready: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'common/usb_pd_policy.c')
-rw-r--r--common/usb_pd_policy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c
index b9ac431d58..05c9363de8 100644
--- a/common/usb_pd_policy.c
+++ b/common/usb_pd_policy.c
@@ -509,6 +509,9 @@ int pd_svdm(int port, int cnt, uint32_t *payload, uint32_t **rpayload)
rsize = 0;
break;
case CMD_DP_CONFIG:
+ if (AMODE_VALID(port) &&
+ pe[port].amode.fx->post_config)
+ pe[port].amode.fx->post_config(port);
/* no response after DFPs ack */
rsize = 0;
break;