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

Commit a2a98023 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

drm/msm/dp: fix MST sink count and attention message handling



Update sink count when detected by panel as no downstream devices
attached. This avoids missing sink update interrupt from sink.
Also, fix the attention message not being routed to MST handling.

CRs-Fixed: 2316018
Change-Id: I5fb2c04a62ffeb4b6acf90f6d18e1a8ba7d0e329
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 1acb0d47
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -862,11 +862,8 @@ static void dp_display_attention_work(struct work_struct *work)
	struct dp_display_private *dp = container_of(work,
			struct dp_display_private, attention_work);

	if (!dp->core_initialized)
		return;

	if (dp->link->process_request(dp->link))
		return;
		goto mst_attention;

	if (dp->link->sink_request & DS_PORT_STATUS_CHANGED) {
		if (dp_display_is_sink_count_zero(dp)) {
@@ -946,7 +943,7 @@ static int dp_display_usbpd_attention_cb(struct device *dev)

		dp_display_handle_disconnect(dp);
		atomic_set(&dp->aborted, 0);
	} else if (dp->hpd->hpd_irq) {
	} else if (dp->hpd->hpd_irq && dp->core_initialized) {
		queue_work(dp->wq, &dp->attention_work);
	} else {
		queue_delayed_work(dp->wq, &dp->connect_work, 0);
+1 −0
Original line number Diff line number Diff line
@@ -899,6 +899,7 @@ static int dp_panel_read_sink_caps(struct dp_panel *dp_panel,
			count = DP_GET_SINK_COUNT(count);
			if (!count) {
				pr_err("no downstream ports connected\n");
				panel->link->sink_count.count = 0;
				rc = -ENOTCONN;
				goto end;
			}