Skip to content

Commit 2b5cf4e

Browse files
committed
drm/i915/dp_mst: Fix enabling pipe clock for all streams
commit afb2c44 ("drm/i915/ddi: Push pipe clock enabling to encoders") inadvertently stopped enabling the pipe clock for any DP-MST stream after the first one. It also rearranged the pipe clock enabling wrt. initial MST payload allocation step (which may or may not be a problem, but it's contrary to the spec.). Fix things by making the above commit truly a non-functional change. Fixes: afb2c44 ("drm/i915/ddi: Push pipe clock enabling to encoders") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107365 Reported-by: Lyude Paul <[email protected]> Reported-by: [email protected] Tested-by: [email protected] Tested-by: Lyude Paul <[email protected]> Cc: Lyude Paul <[email protected]> Cc: [email protected] Cc: Ville Syrjälä <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Chris Wilson <[email protected]> Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 35ab4fd commit 2b5cf4e

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

drivers/gpu/drm/i915/intel_ddi.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
29122912

29132913
icl_enable_phy_clock_gating(dig_port);
29142914

2915-
intel_ddi_enable_pipe_clock(crtc_state);
2915+
if (!is_mst)
2916+
intel_ddi_enable_pipe_clock(crtc_state);
29162917
}
29172918

29182919
static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
@@ -3015,14 +3016,14 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
30153016
bool is_mst = intel_crtc_has_type(old_crtc_state,
30163017
INTEL_OUTPUT_DP_MST);
30173018

3018-
intel_ddi_disable_pipe_clock(old_crtc_state);
3019-
3020-
/*
3021-
* Power down sink before disabling the port, otherwise we end
3022-
* up getting interrupts from the sink on detecting link loss.
3023-
*/
3024-
if (!is_mst)
3019+
if (!is_mst) {
3020+
intel_ddi_disable_pipe_clock(old_crtc_state);
3021+
/*
3022+
* Power down sink before disabling the port, otherwise we end
3023+
* up getting interrupts from the sink on detecting link loss.
3024+
*/
30253025
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
3026+
}
30263027

30273028
intel_disable_ddi_buf(encoder);
30283029

drivers/gpu/drm/i915/intel_dp_mst.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
166166
struct intel_connector *connector =
167167
to_intel_connector(old_conn_state->connector);
168168

169+
intel_ddi_disable_pipe_clock(old_crtc_state);
170+
169171
/* this can fail */
170172
drm_dp_check_act_status(&intel_dp->mst_mgr);
171173
/* and this can also fail */
@@ -249,6 +251,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
249251
I915_WRITE(DP_TP_STATUS(port), temp);
250252

251253
ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
254+
255+
intel_ddi_enable_pipe_clock(pipe_config);
252256
}
253257

254258
static void intel_mst_enable_dp(struct intel_encoder *encoder,

0 commit comments

Comments
 (0)