From e8bd1de8ba60493c44d7cf3604135c385c81cea2 Mon Sep 17 00:00:00 2001 From: Xiaowen Wu Date: Thu, 22 Aug 2019 13:45:44 -0400 Subject: [PATCH] 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 Signed-off-by: Fuad Hossain --- msm/dp/dp_mst_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msm/dp/dp_mst_drm.c b/msm/dp/dp_mst_drm.c index 4861566a2d..41105d9e80 100644 --- a/msm/dp/dp_mst_drm.c +++ b/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,