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

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

drm/msm/dp: handle DisplayPort functionality during framework reboot



Add change to notify userspace regarding DisplayPort connection when
framework restarts and send PSM enable command during framework stop
since DP monitor is connected.

Change-Id: Ic58be0e8c2573973e162e61827ae9b89720d82fe
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent 29d1186c
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -662,6 +662,13 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)
		goto end;
	}

	/*
	 * In case cable/dongle is disconnected during adb shell stop,
	 * reset psm_enabled flag to false since it is no more needed
	 */
	if (dp->dp_display.post_open)
		dp->debug->psm_enabled = false;

	if (dp->debug->psm_enabled)
		dp->link->psm_config(dp->link, &dp->panel->link_info, true);

@@ -1125,6 +1132,14 @@ 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->audio_supported)
			dp->audio->off(dp->audio);

		dp->link->psm_config(dp->link, &dp->panel->link_info, true);
		dp->debug->psm_enabled = true;
	}

	dp->ctrl->push_idle(dp->ctrl);
end:
	mutex_unlock(&dp->session_lock);
@@ -1165,6 +1180,15 @@ static int dp_display_disable(struct dp_display *dp_display)

	memset(&c_state->hdr_meta, 0, sizeof(c_state->hdr_meta));

	/*
	 * In case of framework reboot, the DP off sequence is executed without
	 * 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) {
		dp_display->post_open = dp_display_post_open;
		dp->dp_display.is_connected = false;
	}
	dp->power_on = false;

end: