return connector;
 }
 
-static int modeset_pipe(struct drm_crtc *crtc,
-                       struct drm_modeset_acquire_ctx *ctx)
-{
-       struct drm_atomic_state *state;
-       struct drm_crtc_state *crtc_state;
-       int ret;
-
-       state = drm_atomic_state_alloc(crtc->dev);
-       if (!state)
-               return -ENOMEM;
-
-       state->acquire_ctx = ctx;
-       to_intel_atomic_state(state)->internal = true;
-
-       crtc_state = drm_atomic_get_crtc_state(state, crtc);
-       if (IS_ERR(crtc_state)) {
-               ret = PTR_ERR(crtc_state);
-               goto out;
-       }
-
-       crtc_state->connectors_changed = true;
-
-       ret = drm_atomic_commit(state);
-out:
-       drm_atomic_state_put(state);
-
-       return ret;
-}
-
 static int intel_hdmi_reset_link(struct intel_encoder *encoder,
                                 struct drm_modeset_acquire_ctx *ctx)
 {
         * would be perfectly happy if were to just reconfigure
         * the SCDC settings on the fly.
         */
-       return modeset_pipe(&crtc->base, ctx);
+       return intel_modeset_commit_pipes(dev_priv, BIT(crtc->pipe), ctx);
 }
 
 static enum intel_hotplug_state
 
        return 0;
 }
 
+int intel_modeset_commit_pipes(struct drm_i915_private *i915,
+                              u8 pipe_mask,
+                              struct drm_modeset_acquire_ctx *ctx)
+{
+       struct drm_atomic_state *state;
+       struct intel_crtc *crtc;
+       int ret;
+
+       state = drm_atomic_state_alloc(&i915->drm);
+       if (!state)
+               return -ENOMEM;
+
+       state->acquire_ctx = ctx;
+       to_intel_atomic_state(state)->internal = true;
+
+       for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, pipe_mask) {
+               struct intel_crtc_state *crtc_state =
+                       intel_atomic_get_crtc_state(state, crtc);
+
+               if (IS_ERR(crtc_state)) {
+                       ret = PTR_ERR(crtc_state);
+                       goto out;
+               }
+
+               crtc_state->uapi.connectors_changed = true;
+       }
+
+       ret = drm_atomic_commit(state);
+out:
+       drm_atomic_state_put(state);
+
+       return ret;
+}
+
 /*
  * This implements the workaround described in the "notes" section of the mode
  * set sequence documentation. When going from no pipes or single pipe to
 
                                      const char *reason, u8 pipe_mask);
 int intel_modeset_all_pipes_late(struct intel_atomic_state *state,
                                 const char *reason);
+int intel_modeset_commit_pipes(struct drm_i915_private *i915,
+                              u8 pipe_mask,
+                              struct drm_modeset_acquire_ctx *ctx);
 void intel_modeset_get_crtc_power_domains(struct intel_crtc_state *crtc_state,
                                          struct intel_power_domain_mask *old_domains);
 void intel_modeset_put_crtc_power_domains(struct intel_crtc *crtc,