From 02ad85b541d98ebdfdad254cd1ccad3bdb8c0134 Mon Sep 17 00:00:00 2001 From: Rajat Gupta Date: Thu, 10 Sep 2020 16:48:06 +0530 Subject: [PATCH] disp: msm: dp: skip attention requests on disconnect Don't process any attention requests after hpd off. During automation tests, scripts are doing a mst unplug after hpd off. But sometimes disconnect thread freezes waiting for audio ack. During this freeze unplug happens and uninstalls connector and free the panel and audio objects due to which lock associated with completion variable causes an exception. Change-Id: I4038fd7debc383a96d60906eef17ec6e2163b326 Signed-off-by: Rajat Gupta --- msm/dp/dp_display.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index 2cfa48d809..6bd182a66f 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1437,6 +1437,12 @@ static void dp_display_attention_work(struct work_struct *work) mutex_lock(&dp->session_lock); SDE_EVT32_EXTERNAL(dp->state); + if (dp_display_state_is(DP_STATE_ABORTED)) { + DP_INFO("Hpd off, not handling any attention\n"); + mutex_unlock(&dp->session_lock); + goto exit; + } + if (dp->debug->mst_hpd_sim || !dp_display_state_is(DP_STATE_READY)) { mutex_unlock(&dp->session_lock); goto mst_attention; @@ -1528,6 +1534,7 @@ cp_irq: mst_attention: dp_display_mst_attention(dp); +exit: SDE_EVT32_EXTERNAL(SDE_EVTLOG_FUNC_EXIT, dp->state); }