From 10ac060759f45cc4f81c4f3e61393b35ea9bb916 Mon Sep 17 00:00:00 2001 From: Sandeep Gangadharaiah Date: Tue, 9 Aug 2022 09:03:24 -0700 Subject: [PATCH] disp: msm: dp: remove disconnect call for downstream port status change During MST scenario, plugging out all the downstream monitors connected to the MST hub would trigger a disconnect handler which would cleanup display structure. This isn't required since MST hub is still connected and the display cleanup would be taken care during the actual MST hub disconnect. Also, handling the disconnect immediately on port status notification leaves the usermode in an invalid state where it assumes the display is still enabled and results in commit errors. Change-Id: Ia9a58fadd89bd05746da25f142b54b31e8567258 Signed-off-by: Sandeep Gangadharaiah --- msm/dp/dp_display.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/msm/dp/dp_display.c b/msm/dp/dp_display.c index 141bf9ba..ee8a208c 100644 --- a/msm/dp/dp_display.c +++ b/msm/dp/dp_display.c @@ -1762,15 +1762,16 @@ static void dp_display_attention_work(struct work_struct *work) if (dp->link->sink_request & DS_PORT_STATUS_CHANGED) { SDE_EVT32_EXTERNAL(dp->state, DS_PORT_STATUS_CHANGED); - if (dp_display_is_sink_count_zero(dp)) { - dp_display_handle_disconnect(dp); - } else { - /* - * connect work should take care of sending - * the HPD notification. - */ - if (!dp->mst.mst_active) + if (!dp->mst.mst_active) { + if (dp_display_is_sink_count_zero(dp)) { + dp_display_handle_disconnect(dp); + } else { + /* + * connect work should take care of sending + * the HPD notification. + */ queue_work(dp->wq, &dp->connect_work); + } } goto mst_attention;