Skip to content

Commit f3b93ea

Browse files
committed
drm/i915: Extract intel_ddi_post_disable_hdmi_or_sst()
Extract the "not-MST" stuff from intel_ddi_post_disable() so that the whole thing isn't so cluttered. The bigjoiner slave handling was outside of the !MST check, but it really should have been inside it as its the counterpart to the master handling inside the check. So we pull that in as well. There is no functional change here as we don't currently support bigjoiner+MST anyway. v2: Rebase v3: Actually extract the slave code as claimed in the commit message (presumably a rebase fail in v2) Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240409163502.29633-2-ville.syrjala@linux.intel.com
1 parent 3a487d1 commit f3b93ea

1 file changed

Lines changed: 22 additions & 14 deletions

File tree

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

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,28 +3091,26 @@ static void intel_ddi_post_disable_hdmi(struct intel_atomic_state *state,
30913091
intel_dp_dual_mode_set_tmds_output(intel_hdmi, false);
30923092
}
30933093

3094-
static void intel_ddi_post_disable(struct intel_atomic_state *state,
3095-
struct intel_encoder *encoder,
3096-
const struct intel_crtc_state *old_crtc_state,
3097-
const struct drm_connector_state *old_conn_state)
3094+
static void intel_ddi_post_disable_hdmi_or_sst(struct intel_atomic_state *state,
3095+
struct intel_encoder *encoder,
3096+
const struct intel_crtc_state *old_crtc_state,
3097+
const struct drm_connector_state *old_conn_state)
30983098
{
30993099
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
31003100
struct intel_crtc *slave_crtc;
31013101

3102-
if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
3103-
intel_crtc_vblank_off(old_crtc_state);
3102+
intel_crtc_vblank_off(old_crtc_state);
31043103

3105-
intel_disable_transcoder(old_crtc_state);
3104+
intel_disable_transcoder(old_crtc_state);
31063105

3107-
intel_ddi_disable_transcoder_func(old_crtc_state);
3106+
intel_ddi_disable_transcoder_func(old_crtc_state);
31083107

3109-
intel_dsc_disable(old_crtc_state);
3108+
intel_dsc_disable(old_crtc_state);
31103109

3111-
if (DISPLAY_VER(dev_priv) >= 9)
3112-
skl_scaler_disable(old_crtc_state);
3113-
else
3114-
ilk_pfit_disable(old_crtc_state);
3115-
}
3110+
if (DISPLAY_VER(dev_priv) >= 9)
3111+
skl_scaler_disable(old_crtc_state);
3112+
else
3113+
ilk_pfit_disable(old_crtc_state);
31163114

31173115
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
31183116
intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
@@ -3124,6 +3122,16 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
31243122
intel_dsc_disable(old_slave_crtc_state);
31253123
skl_scaler_disable(old_slave_crtc_state);
31263124
}
3125+
}
3126+
3127+
static void intel_ddi_post_disable(struct intel_atomic_state *state,
3128+
struct intel_encoder *encoder,
3129+
const struct intel_crtc_state *old_crtc_state,
3130+
const struct drm_connector_state *old_conn_state)
3131+
{
3132+
if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST))
3133+
intel_ddi_post_disable_hdmi_or_sst(state, encoder, old_crtc_state,
3134+
old_conn_state);
31273135

31283136
/*
31293137
* When called from DP MST code:

0 commit comments

Comments
 (0)