|
@@ -1342,6 +1342,7 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
|
|
|
void *display, struct drm_atomic_state *state)
|
|
|
{
|
|
|
int rc = 0, slots, i;
|
|
|
+ bool vcpi_released = false;
|
|
|
struct drm_connector_state *old_conn_state;
|
|
|
struct drm_connector_state *new_conn_state;
|
|
|
struct drm_crtc *old_crtc;
|
|
@@ -1416,6 +1417,7 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
|
|
|
slots, rc);
|
|
|
goto end;
|
|
|
}
|
|
|
+ vcpi_released = true;
|
|
|
}
|
|
|
|
|
|
bridge_state->num_slots = 0;
|
|
@@ -1461,6 +1463,15 @@ mode_set:
|
|
|
goto end;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * check if vcpi slots are trying to get allocated in same phase
|
|
|
+ * as deallocation. If so, go to end to avoid allocation.
|
|
|
+ */
|
|
|
+ if (vcpi_released) {
|
|
|
+ DP_WARN("skipping allocation since vcpi was released in the same state\n");
|
|
|
+ goto end;
|
|
|
+ }
|
|
|
+
|
|
|
if (WARN_ON(bridge_state->num_slots)) {
|
|
|
rc = -EINVAL;
|
|
|
goto end;
|