Skip to content

Commit d403b06

Browse files
committed
drm/i915/mst: Add bigjoiner handling to MST modeset sequence
Loop over all joined pipes at relevant points in the MST modeset sequence. Carved out from Vidya's earlier big patch, with naming/etc. changed to match the earlier hsw_crtc_enable() stuff. Reviewed-by: Arun R Murthy <[email protected]> Co-developed-by: Vidya Srinivas <[email protected]> Signed-off-by: Vidya Srinivas <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3607b30 commit d403b06

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
956956
struct drm_dp_mst_atomic_payload *new_payload =
957957
drm_atomic_get_mst_payload_state(new_mst_state, connector->port);
958958
struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
959+
struct intel_crtc *pipe_crtc;
959960
bool last_mst_stream;
960961

961962
intel_dp->active_mst_links--;
@@ -964,7 +965,13 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
964965
DISPLAY_VER(dev_priv) >= 12 && last_mst_stream &&
965966
!intel_dp_mst_is_master_trans(old_crtc_state));
966967

967-
intel_crtc_vblank_off(old_crtc_state);
968+
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
969+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
970+
const struct intel_crtc_state *old_pipe_crtc_state =
971+
intel_atomic_get_old_crtc_state(state, pipe_crtc);
972+
973+
intel_crtc_vblank_off(old_pipe_crtc_state);
974+
}
968975

969976
intel_disable_transcoder(old_crtc_state);
970977

@@ -982,12 +989,18 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
982989

983990
intel_ddi_disable_transcoder_func(old_crtc_state);
984991

985-
intel_dsc_disable(old_crtc_state);
992+
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
993+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
994+
const struct intel_crtc_state *old_pipe_crtc_state =
995+
intel_atomic_get_old_crtc_state(state, pipe_crtc);
986996

987-
if (DISPLAY_VER(dev_priv) >= 9)
988-
skl_scaler_disable(old_crtc_state);
989-
else
990-
ilk_pfit_disable(old_crtc_state);
997+
intel_dsc_disable(old_pipe_crtc_state);
998+
999+
if (DISPLAY_VER(dev_priv) >= 9)
1000+
skl_scaler_disable(old_pipe_crtc_state);
1001+
else
1002+
ilk_pfit_disable(old_pipe_crtc_state);
1003+
}
9911004

9921005
/*
9931006
* Power down mst path before disabling the port, otherwise we end
@@ -1166,6 +1179,7 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state,
11661179
drm_atomic_get_new_mst_topology_state(&state->base, &intel_dp->mst_mgr);
11671180
enum transcoder trans = pipe_config->cpu_transcoder;
11681181
bool first_mst_stream = intel_dp->active_mst_links == 1;
1182+
struct intel_crtc *pipe_crtc;
11691183

11701184
drm_WARN_ON(&dev_priv->drm, pipe_config->has_pch_encoder);
11711185

@@ -1209,7 +1223,13 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state,
12091223

12101224
intel_enable_transcoder(pipe_config);
12111225

1212-
intel_crtc_vblank_on(pipe_config);
1226+
for_each_intel_crtc_in_pipe_mask_reverse(&dev_priv->drm, pipe_crtc,
1227+
intel_crtc_joined_pipe_mask(pipe_config)) {
1228+
const struct intel_crtc_state *pipe_crtc_state =
1229+
intel_atomic_get_new_crtc_state(state, pipe_crtc);
1230+
1231+
intel_crtc_vblank_on(pipe_crtc_state);
1232+
}
12131233

12141234
intel_hdcp_enable(state, encoder, pipe_config, conn_state);
12151235
}

0 commit comments

Comments
 (0)