Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38ee3a0f authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dp: send VDM_CONFIGURE event to USB driver when needed



Some dongles/adapters set the port to DFP_D as part of the attention
message when the dongle is connected and not as part of the VDM_STATUS
callback command. Send the VDM_CONFIGURE command to USB driver and
return callback for such cases. This is needed to perform PIN
configuration of the dongle and initialize DisplayPort host. Handling
HPD high needs to be performed after that.

Change-Id: I5566d7b5a75484f6ae6bb5a6a735564d7fbf98b5
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent 5bd6756a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -352,11 +352,15 @@ static void dp_usbpd_response_cb(struct usbpd_svid_handler *hdlr, u8 cmd,
		pd->vdo = *vdos;
		dp_usbpd_get_status(pd);

		if (!pd->dp_usbpd.alt_mode_cfg_done) {
			if (pd->dp_usbpd.port & BIT(1))
				dp_usbpd_send_event(pd, DP_USBPD_EVT_CONFIGURE);
			break;
		}

		if (pd->dp_cb && pd->dp_cb->attention)
			pd->dp_cb->attention(pd->dev);

		if (!pd->dp_usbpd.alt_mode_cfg_done)
			dp_usbpd_send_event(pd, DP_USBPD_EVT_CONFIGURE);
		break;
	case DP_USBPD_VDM_STATUS:
		pd->vdo = *vdos;