summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSankeerth Billakanti <sbillaka@codeaurora.org>2020-11-16 10:39:22 +0530
committerSankeerth Billakanti <sbillaka@codeaurora.org>2020-11-16 10:56:21 +0530
commit2ddde9144ed4e263f19ed08db0205c6e0bd066e6 (patch)
treefdb01e3b0df46fe4a5602044e74a4fcc6ad19142
parent213d04499e661bed3b36a5294271706088a4964f (diff)
downloaddisplay-drivers-2ddde9144ed4e263f19ed08db0205c6e0bd066e6.tar.gz
disp: msm: dp: handle link maintenance failures
Audio off is done before handling link maintenance requests from sink or receiver. After handling the link maintenance, audio is enabled without verifying the success condition of the link maintenance. If the link maintenance fails, then the DP link will not be established and source will not send video data. So, there is no need to enable audio. This change will skip the audio enable portion of the code whenever the link maintenance fails. The sink may eventually issue another irq_hpd to retry the link training. Change-Id: I1e9aab07d6465ab1b5e6f92717ef7288dc85068f Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
-rw-r--r--msm/dp/dp_display.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c
index b2999d8d..af3bc736 100644
--- a/msm/dp/dp_display.c
+++ b/msm/dp/dp_display.c
@@ -1340,6 +1340,7 @@ static void dp_display_attention_work(struct work_struct *work)
{
struct dp_display_private *dp = container_of(work,
struct dp_display_private, attention_work);
+ int rc = 0;
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_ENTRY, dp->state);
mutex_lock(&dp->session_lock);
@@ -1403,16 +1404,20 @@ static void dp_display_attention_work(struct work_struct *work)
if (dp->link->sink_request & DP_TEST_LINK_TRAINING) {
SDE_EVT32_EXTERNAL(dp->state, DP_TEST_LINK_TRAINING);
dp->link->send_test_response(dp->link);
- dp->ctrl->link_maintenance(dp->ctrl);
+ rc = dp->ctrl->link_maintenance(dp->ctrl);
}
if (dp->link->sink_request & DP_LINK_STATUS_UPDATED) {
SDE_EVT32_EXTERNAL(dp->state, DP_LINK_STATUS_UPDATED);
- dp->ctrl->link_maintenance(dp->ctrl);
+ rc = dp->ctrl->link_maintenance(dp->ctrl);
}
- dp_audio_enable(dp, true);
+ if (!rc)
+ dp_audio_enable(dp, true);
+
mutex_unlock(&dp->session_lock);
+ if (rc)
+ goto end;
if (dp->link->sink_request & (DP_TEST_LINK_PHY_TEST_PATTERN |
DP_TEST_LINK_TRAINING))
@@ -1436,6 +1441,8 @@ cp_irq:
mst_attention:
dp_display_mst_attention(dp);
+
+end:
SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state);
}