disp: msm: dp: destroy mst topology on unplug
On an MST unplug, the MST topology manager state needs to be cleared so it can properly destroy the current topology. But since the mst active state is cleared prematurely in the driver, this call is skipped and on a subsequent plug-in, the topology manager ends up using stale topology from previous configuration. Incorrect RAD values are used for sideband, causing them to fail. This change fixes the order of operations, so the topology manager state is properly updated on unplug. It also removes a duplicate hpd notification to usermode. Change-Id: Idcff17be113a361a0b58e54d85957f30d1d4e2d6 Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
This commit is contained in:
@@ -907,7 +907,7 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp)
|
|||||||
if (!dp->mst.cbs.hpd)
|
if (!dp->mst.cbs.hpd)
|
||||||
goto skip_wait;
|
goto skip_wait;
|
||||||
|
|
||||||
dp->mst.cbs.hpd(&dp->dp_display, true);
|
dp->mst.cbs.hpd(&dp->dp_display, hpd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hpd) {
|
if (hpd) {
|
||||||
@@ -1289,21 +1289,18 @@ static void dp_display_process_mst_hpd_low(struct dp_display_private *dp)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* HPD unplug callflow:
|
* HPD unplug callflow:
|
||||||
* 1. send hpd unplug event with status=disconnected
|
* 1. send hpd unplug on base connector so usermode can disable
|
||||||
* 2. send hpd unplug on base connector so usermode can disable
|
|
||||||
* all external displays.
|
* all external displays.
|
||||||
* 3. unset mst state in the topology mgr so the branch device
|
* 2. unset mst state in the topology mgr so the branch device
|
||||||
* can be cleaned up.
|
* can be cleaned up.
|
||||||
*/
|
*/
|
||||||
if (dp->mst.cbs.hpd)
|
|
||||||
dp->mst.cbs.hpd(&dp->dp_display, false);
|
|
||||||
|
|
||||||
if ((dp_display_state_is(DP_STATE_CONNECT_NOTIFIED) ||
|
if ((dp_display_state_is(DP_STATE_CONNECT_NOTIFIED) ||
|
||||||
dp_display_state_is(DP_STATE_ENABLED)))
|
dp_display_state_is(DP_STATE_ENABLED)))
|
||||||
rc = dp_display_send_hpd_notification(dp);
|
rc = dp_display_send_hpd_notification(dp);
|
||||||
|
|
||||||
dp_display_update_mst_state(dp, false);
|
|
||||||
dp_display_set_mst_mgr_state(dp, false);
|
dp_display_set_mst_mgr_state(dp, false);
|
||||||
|
dp_display_update_mst_state(dp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
DP_MST_DEBUG("mst_hpd_low. mst_active:%d\n", dp->mst.mst_active);
|
DP_MST_DEBUG("mst_hpd_low. mst_active:%d\n", dp->mst.mst_active);
|
||||||
|
Reference in New Issue
Block a user