disp: msm: dp: ensure display is disabled before deinit
When hpd disconnect is received, the dp driver sends an uevent to usermode and waits for the usermode to tear down all external displays before turning off the dp link. If the wait for uevent completion times out or exits prematurely due to a race condition with the connect path, it is possible for the dp link to be turned off prematurely, with displays still in enabled state. On a subsequent hpd disconnect, the driver attempts to disable the display causing this issue since the link has been already turned off. This change adds a check for display status after uevent handling and before turning off dp link, to make sure the displays are always cleaned up before the link is turned off. Any future attempts to disable from usermode will be ignored. Change-Id: I404ad90b037fede9c9469a2fd16ca1fbdbd36b7c Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
This commit is contained in:
@@ -1287,7 +1287,7 @@ static int dp_display_handle_disconnect(struct dp_display_private *dp)
|
||||
}
|
||||
|
||||
mutex_lock(&dp->session_lock);
|
||||
if (rc && dp_display_state_is(DP_STATE_ENABLED))
|
||||
if (dp_display_state_is(DP_STATE_ENABLED))
|
||||
dp_display_clean(dp);
|
||||
|
||||
dp_display_host_unready(dp);
|
||||
|
Reference in New Issue
Block a user