Browse Source

disp: msm: dp: Fix dp mst vcpi slot management for inactive crtcs

For crtcs attached to mst connectors, vcpi slots
are being allocated whether or not that crtc is
currently active. This will cause leaks during
lastclose when the crtc is inactive, because the
slots will get allocated, but never freed.

Check if the crtc state is active before
proceeding to allocate vcpi slots for that mst
connector.

CRs-Fixed: 2520907
Change-Id: I359738868e9bc72163f9e33204ff6cd7f0143b09
Signed-off-by: Xiaowen Wu <[email protected]>
Signed-off-by: Fuad Hossain <[email protected]>
Xiaowen Wu 5 years ago
parent
commit
e8bd1de8ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      msm/dp/dp_mst_drm.c

+ 1 - 1
msm/dp/dp_mst_drm.c

@@ -1451,7 +1451,7 @@ mode_set:
 
 	crtc_state = drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
 
-	if (drm_atomic_crtc_needs_modeset(crtc_state)) {
+	if (drm_atomic_crtc_needs_modeset(crtc_state) && crtc_state->active) {
 		c_conn = to_sde_connector(connector);
 
 		dp_display->convert_to_dp_mode(dp_display, c_conn->drv_panel,