diff options
author | Abhinav Kumar <abhinavk@codeaurora.org> | 2020-09-12 23:49:31 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-15 20:54:35 +0300 |
commit | bf4a1b3127d34b0b6ee0565b31ff699b3dc9c48e (patch) | |
tree | 24d3496cd4497b5fad4798b1f6b84a67daf97d4c /drivers/gpu/drm/msm/dp | |
parent | a1f5bda99b7bee46b01f6a9f256671c8efef0ec9 (diff) | |
download | linux-bf4a1b3127d34b0b6ee0565b31ff699b3dc9c48e.tar.xz |
drm/msm/dp: signal the hotplug disconnect in the event handler
Signal the hotplug disconnect event to the audio side in the
event handler so that they are notified earlier and have more
time to process the disconnect event.
Changes in v2: none
Changes in v3: none
Changes in v4: rebase on top of latest patchset of dependency
Changes in v5: rebase on top of latest patchset of dependency
Changes in v6: none
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dp')
-rw-r--r-- | drivers/gpu/drm/msm/dp/dp_display.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index c30ffe778ffe..32d2236b20b2 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -545,6 +545,13 @@ static int dp_connect_pending_timeout(struct dp_display_private *dp, u32 data) return 0; } +static void dp_display_handle_plugged_change(struct msm_dp *dp_display, + bool plugged) +{ + if (dp_display->plugged_cb && dp_display->codec_dev) + dp_display->plugged_cb(dp_display->codec_dev, plugged); +} + static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) { struct dp_usbpd *hpd = dp->usbpd; @@ -590,6 +597,9 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) /* start sanity checking */ dp_add_event(dp, EV_DISCONNECT_PENDING_TIMEOUT, 0, DP_TIMEOUT_5_SECOND); + /* signal the disconnect event early to ensure proper teardown */ + dp_display_handle_plugged_change(g_dp_display, false); + dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK | DP_DP_IRQ_HPD_INT_MASK, true); @@ -780,13 +790,6 @@ static int dp_display_prepare(struct msm_dp *dp) return 0; } -static void dp_display_handle_plugged_change(struct msm_dp *dp_display, - bool plugged) -{ - if (dp_display->plugged_cb && dp_display->codec_dev) - dp_display->plugged_cb(dp_display->codec_dev, plugged); -} - static int dp_display_enable(struct dp_display_private *dp, u32 data) { int rc = 0; @@ -1371,8 +1374,6 @@ int msm_dp_display_pre_disable(struct msm_dp *dp, struct drm_encoder *encoder) dp_ctrl_push_idle(dp_display->ctrl); - dp_display_handle_plugged_change(dp, false); - return 0; } |