@@ -290,7 +290,8 @@ static int
290290update_connector_routing (struct drm_atomic_state * state ,
291291 struct drm_connector * connector ,
292292 struct drm_connector_state * old_connector_state ,
293- struct drm_connector_state * new_connector_state )
293+ struct drm_connector_state * new_connector_state ,
294+ bool added_by_user )
294295{
295296 const struct drm_connector_helper_funcs * funcs ;
296297 struct drm_encoder * new_encoder ;
@@ -339,9 +340,13 @@ update_connector_routing(struct drm_atomic_state *state,
339340 * there's a chance the connector may have been destroyed during the
340341 * process, but it's better to ignore that then cause
341342 * drm_atomic_helper_resume() to fail.
343+ *
344+ * Last, we want to ignore connector registration when the connector
345+ * was not pulled in the atomic state by user-space (ie, was pulled
346+ * in by the driver, e.g. when updating a DP-MST stream).
342347 */
343348 if (!state -> duplicated && drm_connector_is_unregistered (connector ) &&
344- crtc_state -> active ) {
349+ added_by_user && crtc_state -> active ) {
345350 drm_dbg_atomic (connector -> dev ,
346351 "[CONNECTOR:%d:%s] is not registered\n" ,
347352 connector -> base .id , connector -> name );
@@ -620,7 +625,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
620625 struct drm_connector * connector ;
621626 struct drm_connector_state * old_connector_state , * new_connector_state ;
622627 int i , ret ;
623- unsigned int connectors_mask = 0 ;
628+ unsigned int connectors_mask = 0 , user_connectors_mask = 0 ;
629+
630+ for_each_oldnew_connector_in_state (state , connector , old_connector_state , new_connector_state , i )
631+ user_connectors_mask |= BIT (i );
624632
625633 for_each_oldnew_crtc_in_state (state , crtc , old_crtc_state , new_crtc_state , i ) {
626634 bool has_connectors =
@@ -685,7 +693,8 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
685693 */
686694 ret = update_connector_routing (state , connector ,
687695 old_connector_state ,
688- new_connector_state );
696+ new_connector_state ,
697+ BIT (i ) & user_connectors_mask );
689698 if (ret )
690699 return ret ;
691700 if (old_connector_state -> crtc ) {
0 commit comments