From d7bc0eebfeb520a2d760de79b89a1f3e57a1bdb7 Mon Sep 17 00:00:00 2001 From: Sankeerth Billakanti Date: Tue, 4 Feb 2020 16:40:55 +0530 Subject: [PATCH] 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: Sankeerth Billakanti Signed-off-by: Tatenda Chipeperekwa --- msm/dp/dp_display.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index ca4605f3fbe3..e18829044fbe 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1408,23 +1408,25 @@ 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 { - /* - * It is possible that the connect_work skipped sending - * the HPD notification if the attention message was - * already pending. Send the notification here to - * account for that. This is not needed if this - * attention work was handling a test request - */ - 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); + + if (!dp->mst.mst_active) { + /* + * It is possible that the connect_work skipped sending + * the HPD notification if the attention message was + * already pending. Send the notification here to + * account for that. This is not needed if this + * attention work was handling a test request + */ + dp_display_send_hpd_notification(dp); + } + mst_attention: dp_display_mst_attention(dp); SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state);