At dongle unplug, dp initializes audio_comp followed by sending disconnect event notification to audio and to make sure audio had shutdown completely by wait for audio completion notification at display_disable(). This patch will not re initialize audio_comp at display_disable() if audio shutdown is triggered by dongle unplugged. Signed-off-by: Kuogee Hsieh <khsieh@xxxxxxxxxxxxxx> --- drivers/gpu/drm/msm/dp/dp_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 0ba71c7..1d71c95 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -894,8 +894,10 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data) /* wait only if audio was enabled */ if (dp_display->audio_enabled) { /* signal the disconnect event */ - reinit_completion(&dp->audio_comp); - dp_display_handle_plugged_change(dp_display, false); + if (dp->hpd_state != ST_DISCONNECT_PENDING) { + reinit_completion(&dp->audio_comp); + dp_display_handle_plugged_change(dp_display, false); + } if (!wait_for_completion_timeout(&dp->audio_comp, HZ * 5)) DRM_ERROR("audio comp timeout\n"); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project