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

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

drm/msm/dp: check for sink count before enabling post_open callback



When the DP cable is disconnected at the sink side with the type-C cable
connected to the device, some dongles retain the hpd_high variable to
'true' but change the sink count to zero as part of the attention
callback. Check for sink count reported by the dongle in addition to
hpd_high status variable before enabling post_open callback during DP
disable sequence.

Change-Id: I002d039f79543eb6176df2eb2b6c648f586be429
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent bc46a78f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1182,7 +1182,8 @@ static int dp_display_pre_disable(struct dp_display *dp_display)
			dp->hdcp.ops->off(dp->hdcp.data);
	}

	if (dp->usbpd->hpd_high && dp->usbpd->alt_mode_cfg_done) {
	if (dp->usbpd->hpd_high && !dp_display_is_sink_count_zero(dp) &&
		dp->usbpd->alt_mode_cfg_done) {
		if (dp->audio_supported)
			dp->audio->off(dp->audio);

@@ -1235,7 +1236,8 @@ static int dp_display_disable(struct dp_display *dp_display)
	 * any notification from driver. Initialize post_open callback to notify
	 * DP connection once framework restarts.
	 */
	if (dp->usbpd->hpd_high && dp->usbpd->alt_mode_cfg_done)
	if (dp->usbpd->hpd_high && !dp_display_is_sink_count_zero(dp) &&
		dp->usbpd->alt_mode_cfg_done)
		dp_display->post_open = dp_display_post_open;

	dp->power_on = false;