diff options
| author | Jack Pham <jackp@codeaurora.org> | 2016-11-05 09:07:09 -0700 |
|---|---|---|
| committer | Jack Pham <jackp@codeaurora.org> | 2016-11-15 19:36:36 -0800 |
| commit | ed70a236571809feb48aa3e11b6b2df02ca573f3 (patch) | |
| tree | ff1d38998e695a38f3cb4add62f9650593cfcdfc | |
| parent | f50e4f241296461bdf3e50a4a9aec366e0bf4140 (diff) | |
msm: mdss: dp: Fix PD compliance issues
Fix issues found during PD compliance testing for DisplayPort
downstream ports:
- The outgoing DP Status message must contain a single VDO. This
also fixes certain devices which would not respond unless there
was a status object included in the request. Initialize this to
0x1 to indicate that the DFP_D is connected.
- Don't send Enter Mode if the discovered mode doesn't support UFP_D.
- Don't send Configure if the Status response doesn't support UFP_D.
Change-Id: I690860613670753ae6634786f3ee2746a36be54a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c index 29fc4e6fd65b..1e96782ba723 100644 --- a/drivers/video/fbdev/msm/mdss_dp.c +++ b/drivers/video/fbdev/msm/mdss_dp.c @@ -2152,8 +2152,9 @@ static void mdss_dp_event_work(struct work_struct *work) SVDM_CMD_TYPE_INITIATOR, 0x1, 0x0, 0x0); break; case EV_USBPD_DP_STATUS: + config = 0x1; /* DFP_D connected */ usbpd_send_svdm(dp->pd, USB_C_DP_SID, DP_VDM_STATUS, - SVDM_CMD_TYPE_INITIATOR, 0x1, 0x0, 0x0); + SVDM_CMD_TYPE_INITIATOR, 0x1, &config, 0x1); break; case EV_USBPD_DP_CONFIGURE: config = mdss_dp_usbpd_gen_config_pkt(dp); @@ -2552,7 +2553,8 @@ static void usbpd_response_callback(struct usbpd_svid_handler *hdlr, u8 cmd, dp_drv->alt_mode.dp_cap.response = *vdos; mdss_dp_usbpd_ext_capabilities(&dp_drv->alt_mode.dp_cap); dp_drv->alt_mode.current_state |= DISCOVER_MODES_DONE; - dp_send_events(dp_drv, EV_USBPD_ENTER_MODE); + if (dp_drv->alt_mode.dp_cap.s_port & BIT(0)) + dp_send_events(dp_drv, EV_USBPD_ENTER_MODE); break; case USBPD_SVDM_ENTER_MODE: dp_drv->alt_mode.current_state |= ENTER_MODE_DONE; @@ -2574,7 +2576,8 @@ static void usbpd_response_callback(struct usbpd_svid_handler *hdlr, u8 cmd, if (!(dp_drv->alt_mode.current_state & DP_CONFIGURE_DONE)) { dp_drv->alt_mode.current_state |= DP_STATUS_DONE; - dp_send_events(dp_drv, EV_USBPD_DP_CONFIGURE); + if (dp_drv->alt_mode.dp_status.c_port & BIT(1)) + dp_send_events(dp_drv, EV_USBPD_DP_CONFIGURE); } break; case DP_VDM_CONFIGURE: |
