Commit c703d578 authored by Judy Hsiao's avatar Judy Hsiao Committed by Rob Clark

drm/msm/dp: trigger unplug event in msm_dp_display_disable

1. Trigger the unplug event in msm_dp_display_disable() to shutdown audio
   properly.
2. Reset the completion before signal the disconnect event.

Fixes: 158b9aa7 ("drm/msm/dp: wait for audio notification before disabling clocks")
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Tested-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarJudy Hsiao <judyhsiao@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent a014abfe
...@@ -651,8 +651,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) ...@@ -651,8 +651,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data)
dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND); dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND);
/* signal the disconnect event early to ensure proper teardown */ /* signal the disconnect event early to ensure proper teardown */
dp_display_handle_plugged_change(g_dp_display, false);
reinit_completion(&dp->audio_comp); reinit_completion(&dp->audio_comp);
dp_display_handle_plugged_change(g_dp_display, false);
dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK | dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK |
DP_DP_IRQ_HPD_INT_MASK, true); DP_DP_IRQ_HPD_INT_MASK, true);
...@@ -897,6 +897,9 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data) ...@@ -897,6 +897,9 @@ static int dp_display_disable(struct dp_display_private *dp, u32 data)
/* wait only if audio was enabled */ /* wait only if audio was enabled */
if (dp_display->audio_enabled) { if (dp_display->audio_enabled) {
/* signal the disconnect event */
reinit_completion(&dp->audio_comp);
dp_display_handle_plugged_change(dp_display, false);
if (!wait_for_completion_timeout(&dp->audio_comp, if (!wait_for_completion_timeout(&dp->audio_comp,
HZ * 5)) HZ * 5))
DRM_ERROR("audio comp timeout\n"); DRM_ERROR("audio comp timeout\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment