@@ -290,7 +290,8 @@ static int
290
290
update_connector_routing (struct drm_atomic_state * state ,
291
291
struct drm_connector * connector ,
292
292
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 )
294
295
{
295
296
const struct drm_connector_helper_funcs * funcs ;
296
297
struct drm_encoder * new_encoder ;
@@ -339,9 +340,13 @@ update_connector_routing(struct drm_atomic_state *state,
339
340
* there's a chance the connector may have been destroyed during the
340
341
* process, but it's better to ignore that then cause
341
342
* 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).
342
347
*/
343
348
if (!state -> duplicated && drm_connector_is_unregistered (connector ) &&
344
- crtc_state -> active ) {
349
+ added_by_user && crtc_state -> active ) {
345
350
drm_dbg_atomic (connector -> dev ,
346
351
"[CONNECTOR:%d:%s] is not registered\n" ,
347
352
connector -> base .id , connector -> name );
@@ -620,7 +625,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
620
625
struct drm_connector * connector ;
621
626
struct drm_connector_state * old_connector_state , * new_connector_state ;
622
627
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 );
624
632
625
633
for_each_oldnew_crtc_in_state (state , crtc , old_crtc_state , new_crtc_state , i ) {
626
634
bool has_connectors =
@@ -685,7 +693,8 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
685
693
*/
686
694
ret = update_connector_routing (state , connector ,
687
695
old_connector_state ,
688
- new_connector_state );
696
+ new_connector_state ,
697
+ BIT (i ) & user_connectors_mask );
689
698
if (ret )
690
699
return ret ;
691
700
if (old_connector_state -> crtc ) {
0 commit comments