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

Commit df40834e authored by Sankeerth Billakanti's avatar Sankeerth Billakanti
Browse files

disp: msm: dp: send dp hpd notification from attention_work



The hpd notification is skipped in connect_work if there is an
attention_work pending. So, the notification has to be sent in
attention_work.

Some dongles issue multiple attention events with LINK_STATUS_UPDATED
while the connect_work is in progress. So, once the link training
is successfully completed the LINK_STATUS_UPDATED attention event is
considered handled and the attention_work scheduled to execute after
the connect_work will return early without handling the
hpd_notification cases.

This change will ensure the hpd_notification is sent from
attention_work in such cases.

Change-Id: I5ef6781354b80842d2a6f44360cde25ee6d2b0b7
Signed-off-by: default avatarSankeerth Billakanti <sbillaka@codeaurora.org>
parent c0018ab6
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -1365,9 +1365,15 @@ static void dp_display_attention_work(struct work_struct *work)
		mutex_unlock(&dp->session_lock);

		if (dp->link->sink_request & (DP_TEST_LINK_PHY_TEST_PATTERN |
			DP_TEST_LINK_TRAINING)) {
			DP_TEST_LINK_TRAINING))
			goto mst_attention;
		} else {
	}

cp_irq:
	if (dp_display_is_hdcp_enabled(dp) && dp->hdcp.ops->cp_irq)
		dp->hdcp.ops->cp_irq(dp->hdcp.data);

	if (!dp->mst.mst_active) {
		/*
		 * It is possible that the connect_work skipped sending
		 * the HPD notification if the attention message was
@@ -1377,11 +1383,7 @@ static void dp_display_attention_work(struct work_struct *work)
		 */
		dp_display_send_hpd_notification(dp);
	}
	}

cp_irq:
	if (dp_display_is_hdcp_enabled(dp) && dp->hdcp.ops->cp_irq)
		dp->hdcp.ops->cp_irq(dp->hdcp.data);
mst_attention:
	dp_display_mst_attention(dp);
	SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state);