Browse Source

disp: msm: dp:Add ready state check in deinit flow

Add check for READY state in dp_display_host_deinit.

Clear READY state in deinit flow to prevent state machine
errors with multiple concurrent plug/unplug events.

Change-Id: I0b17cffc7a3261ae4259225bb51452162763ae2a
Signed-off-by: Nisarg Bhavsar <[email protected]>
Nisarg Bhavsar 1 year ago
parent
commit
b97e86c661
1 changed files with 5 additions and 0 deletions
  1. 5 0
      msm/dp/dp_display.c

+ 5 - 0
msm/dp/dp_display.c

@@ -1188,6 +1188,11 @@ static void dp_display_host_deinit(struct dp_display_private *dp)
 		return;
 	}
 
+	if (dp_display_state_is(DP_STATE_READY)) {
+		DP_DEBUG("dp deinit before unready\n");
+		dp_display_host_unready(dp);
+	}
+
 	dp_display_abort_hdcp(dp, true);
 	dp->ctrl->deinit(dp->ctrl);
 	dp->hpd->host_deinit(dp->hpd, &dp->catalog->hpd);