Skip to content

Commit 2c69679

Browse files
ideakjlahtine-intel
authored andcommitted
drm/i915/dp_mst: Fix active port PLL selection for secondary MST streams
The port PLL selection needs to be up-to-date in the CRTC state of both the primary and all secondary MST streams. The commit removing the encoder update_prepare/complete hooks (see Fixes: below), stopped doing this for secondary streams, fix this up. Fixes: 0f752b2 ("drm/i915: Remove the encoder update_prepare()/complete() hooks") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8336 Cc: Mika Kahola <[email protected]> Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 27ac123) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 803033c commit 2c69679

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

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

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3060,6 +3060,25 @@ void intel_ddi_update_pipe(struct intel_atomic_state *state,
30603060
intel_hdcp_update_pipe(state, encoder, crtc_state, conn_state);
30613061
}
30623062

3063+
void intel_ddi_update_active_dpll(struct intel_atomic_state *state,
3064+
struct intel_encoder *encoder,
3065+
struct intel_crtc *crtc)
3066+
{
3067+
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
3068+
struct intel_crtc_state *crtc_state =
3069+
intel_atomic_get_new_crtc_state(state, crtc);
3070+
struct intel_crtc *slave_crtc;
3071+
enum phy phy = intel_port_to_phy(i915, encoder->port);
3072+
3073+
if (!intel_phy_is_tc(i915, phy))
3074+
return;
3075+
3076+
intel_update_active_dpll(state, crtc, encoder);
3077+
for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
3078+
intel_crtc_bigjoiner_slave_pipes(crtc_state))
3079+
intel_update_active_dpll(state, slave_crtc, encoder);
3080+
}
3081+
30633082
static void
30643083
intel_ddi_pre_pll_enable(struct intel_atomic_state *state,
30653084
struct intel_encoder *encoder,
@@ -3074,15 +3093,9 @@ intel_ddi_pre_pll_enable(struct intel_atomic_state *state,
30743093
if (is_tc_port) {
30753094
struct intel_crtc *master_crtc =
30763095
to_intel_crtc(crtc_state->uapi.crtc);
3077-
struct intel_crtc *slave_crtc;
30783096

30793097
intel_tc_port_get_link(dig_port, crtc_state->lane_count);
3080-
3081-
intel_update_active_dpll(state, master_crtc, encoder);
3082-
3083-
for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
3084-
intel_crtc_bigjoiner_slave_pipes(crtc_state))
3085-
intel_update_active_dpll(state, slave_crtc, encoder);
3098+
intel_ddi_update_active_dpll(state, encoder, master_crtc);
30863099
}
30873100

30883101
main_link_aux_power_domain_get(dig_port, crtc_state);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,8 @@ void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder);
7272
int intel_ddi_level(struct intel_encoder *encoder,
7373
const struct intel_crtc_state *crtc_state,
7474
int lane);
75+
void intel_ddi_update_active_dpll(struct intel_atomic_state *state,
76+
struct intel_encoder *encoder,
77+
struct intel_crtc *crtc);
7578

7679
#endif /* __INTEL_DDI_H__ */

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,13 @@ static void intel_mst_pre_pll_enable_dp(struct intel_atomic_state *state,
674674
if (intel_dp->active_mst_links == 0)
675675
dig_port->base.pre_pll_enable(state, &dig_port->base,
676676
pipe_config, NULL);
677+
else
678+
/*
679+
* The port PLL state needs to get updated for secondary
680+
* streams as for the primary stream.
681+
*/
682+
intel_ddi_update_active_dpll(state, &dig_port->base,
683+
to_intel_crtc(pipe_config->uapi.crtc));
677684
}
678685

679686
static void intel_mst_pre_enable_dp(struct intel_atomic_state *state,

0 commit comments

Comments
 (0)