Skip to content

Commit 789c4ae

Browse files
elongbugjlahtine-intel
authored andcommitted
drm/i915: Split a setting of MSA to MST and SST
The setting of MSA is done by the DDI .pre_enable() hook. And when we are using MST, the MSA is only set to first mst stream by calling of DDI .pre_eanble() hook. It raies issues to non-first mst streams. Wrong MSA or missed MSA packets might show scrambled screen or wrong screen. This splits a setting of MSA to MST and SST cases. And In the MST case it will call a setting of MSA after an allocating of Virtual Channel from MST encoder pre_enable callback. Cc: Ville Syrjälä <[email protected]> Cc: Stanislav Lisovskiy <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112212 Fixes: 0c06fa1 ("drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA") Fixes: d4a415d ("drm/i915: Fix MST oops due to MSA changes") Signed-off-by: Gwan-gyeong Mun <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Lucas De Marchi <[email protected]> [vsyrjala: nuke spurious newline] Signed-off-by: Ville Syrjälä <[email protected]> (cherry picked from commit bd8c9cc) Signed-off-by: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 98ae6fb commit 789c4ae

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,10 +1794,8 @@ void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state,
17941794
* of Color Encoding Format and Content Color Gamut] while sending
17951795
* YCBCR 420, HDR BT.2020 signals we should program MSA MISC1 fields
17961796
* which indicate VSC SDP for the Pixel Encoding/Colorimetry Format.
1797-
*
1798-
* FIXME MST doesn't pass in the conn_state
17991797
*/
1800-
if (conn_state && intel_dp_needs_vsc_sdp(crtc_state, conn_state))
1798+
if (intel_dp_needs_vsc_sdp(crtc_state, conn_state))
18011799
temp |= DP_MSA_MISC_COLOR_VSC_SDP;
18021800

18031801
I915_WRITE(TRANS_MSA_MISC(cpu_transcoder), temp);
@@ -3605,7 +3603,11 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
36053603
else
36063604
hsw_ddi_pre_enable_dp(encoder, crtc_state, conn_state);
36073605

3608-
intel_ddi_set_dp_msa(crtc_state, conn_state);
3606+
/* MST will call a setting of MSA after an allocating of Virtual Channel
3607+
* from MST encoder pre_enable callback.
3608+
*/
3609+
if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST))
3610+
intel_ddi_set_dp_msa(crtc_state, conn_state);
36093611
}
36103612

36113613
static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
331331
ret = drm_dp_update_payload_part1(&intel_dp->mst_mgr);
332332

333333
intel_ddi_enable_pipe_clock(pipe_config);
334+
335+
intel_ddi_set_dp_msa(pipe_config, conn_state);
334336
}
335337

336338
static void intel_mst_enable_dp(struct intel_encoder *encoder,

0 commit comments

Comments
 (0)