Browse Source

disp: msm: dp: avoid releasing vcpi for active crtc

In MST atomic check function, add a check to ensure it's a disable call
before releasing vcpi slots to ensure atomic_release_vcpi_slots() and
atomic_find_vcpi_slots() are never called in the same atomic check
as mentioned in the kernel docs.

Change-Id: I36cf689b4d3bf9d2469a6c402b6377a667f01c12
Signed-off-by: Andrew Bartfeld <[email protected]>
Andrew Bartfeld 2 năm trước cách đây
mục cha
commit
5dcee7c010
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      msm/dp/dp_mst_drm.c

+ 2 - 1
msm/dp/dp_mst_drm.c

@@ -1216,7 +1216,8 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
 				bridge->num_slots);
 	}
 
-	if (drm_atomic_crtc_needs_modeset(crtc_state)) {
+	/* do not attempt to release vcpi slots if crtc state is enable */
+	if (drm_atomic_crtc_needs_modeset(crtc_state) && !crtc_state->enable) {
 		if (WARN_ON(!old_conn_state->best_encoder)) {
 			rc = -EINVAL;
 			goto end;