Skip to content

Commit b7ce280

Browse files
committed
drm/i915: Utilize intel_crtc_joined_pipe_mask() more
Unify the master vs. slave handling in intel_ddi_post_disable_hdmi_or_sst() by looping over all the pipes in one go. This also lets us move the intel_crtc_vblank_off() calls to happen in a consistent place vs. the transcoder disable. Previously we did the master vs. slaves on different sides of that. v2: Use the name 'pipe_crtc' for the per-pipe crtc pointer Tested-by: Vidya Srinivas <[email protected]> Reviewed-by: Arun R Murthy <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f3b93ea commit b7ce280

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3097,30 +3097,31 @@ static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
30973097
const struct drm_connector_state *old_conn_state)
30983098
{
30993099
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
3100-
struct intel_crtc *slave_crtc;
3100+
struct intel_crtc *pipe_crtc;
3101+
3102+
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
3103+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
3104+
const struct intel_crtc_state *old_pipe_crtc_state =
3105+
intel_atomic_get_old_crtc_state(state, pipe_crtc);
31013106

3102-
intel_crtc_vblank_off(old_crtc_state);
3107+
intel_crtc_vblank_off(old_pipe_crtc_state);
3108+
}
31033109

31043110
intel_disable_transcoder(old_crtc_state);
31053111

31063112
intel_ddi_disable_transcoder_func(old_crtc_state);
31073113

3108-
intel_dsc_disable(old_crtc_state);
3114+
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, pipe_crtc,
3115+
intel_crtc_joined_pipe_mask(old_crtc_state)) {
3116+
const struct intel_crtc_state *old_pipe_crtc_state =
3117+
intel_atomic_get_old_crtc_state(state, pipe_crtc);
31093118

3110-
if (DISPLAY_VER(dev_priv) >= 9)
3111-
skl_scaler_disable(old_crtc_state);
3112-
else
3113-
ilk_pfit_disable(old_crtc_state);
3119+
intel_dsc_disable(old_pipe_crtc_state);
31143120

3115-
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
3116-
intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
3117-
const struct intel_crtc_state *old_slave_crtc_state =
3118-
intel_atomic_get_old_crtc_state(state, slave_crtc);
3119-
3120-
intel_crtc_vblank_off(old_slave_crtc_state);
3121-
3122-
intel_dsc_disable(old_slave_crtc_state);
3123-
skl_scaler_disable(old_slave_crtc_state);
3121+
if (DISPLAY_VER(dev_priv) >= 9)
3122+
skl_scaler_disable(old_pipe_crtc_state);
3123+
else
3124+
ilk_pfit_disable(old_pipe_crtc_state);
31243125
}
31253126
}
31263127

0 commit comments

Comments
 (0)