Skip to content

Commit ef0a075

Browse files
committed
drm/i915/dp: compute config for 128b/132b SST w/o DSC
Enable basic 128b/132b SST functionality without compression. Reuse intel_dp_mtp_tu_compute_config() to figure out the TU after we've determined we need to use an UHBR rate. It's slightly complicated as the M/N computation is done in different places in MST and SST paths, so we need to avoid trashing the values later for UHBR. If uncompressed UHBR fails, we drop to compressed non-UHBR, which is quite likely to fail as well. We still lack 128b/132b SST+DSC. We need mst_master_transcoder also for 128b/132b SST. Use cpu_transcoder directly. Enhanced framing is "don't care" for 128b/132b link. v2: mst_master_transcoder, enhanced framing (Imre) Reviewed-by: Imre Deak <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/084e4e05bf25a5dd396dd391014943d42b11c88d.1735912293.git.jani.nikula@intel.com
1 parent 79a6734 commit ef0a075

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

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

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2519,8 +2519,8 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
25192519
limits->min_rate = intel_dp_min_link_rate(intel_dp);
25202520
limits->max_rate = intel_dp_max_link_rate(intel_dp);
25212521

2522-
/* FIXME 128b/132b SST support missing */
2523-
if (!is_mst)
2522+
/* FIXME 128b/132b SST+DSC support missing */
2523+
if (!is_mst && dsc)
25242524
limits->max_rate = min(limits->max_rate, 810000);
25252525
limits->min_rate = min(limits->min_rate, limits->max_rate);
25262526

@@ -2638,6 +2638,13 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
26382638
*/
26392639
ret = intel_dp_compute_link_config_wide(intel_dp, pipe_config,
26402640
conn_state, &limits);
2641+
if (!ret && intel_dp_is_uhbr(pipe_config))
2642+
ret = intel_dp_mtp_tu_compute_config(intel_dp,
2643+
pipe_config,
2644+
pipe_config->pipe_bpp,
2645+
pipe_config->pipe_bpp,
2646+
conn_state,
2647+
0, false);
26412648
if (ret)
26422649
dsc_needed = true;
26432650
}
@@ -3151,8 +3158,13 @@ intel_dp_compute_config(struct intel_encoder *encoder,
31513158
pipe_config->limited_color_range =
31523159
intel_dp_limited_color_range(pipe_config, conn_state);
31533160

3154-
pipe_config->enhanced_framing =
3155-
drm_dp_enhanced_frame_cap(intel_dp->dpcd);
3161+
if (intel_dp_is_uhbr(pipe_config)) {
3162+
/* 128b/132b SST also needs this */
3163+
pipe_config->mst_master_transcoder = pipe_config->cpu_transcoder;
3164+
} else {
3165+
pipe_config->enhanced_framing =
3166+
drm_dp_enhanced_frame_cap(intel_dp->dpcd);
3167+
}
31563168

31573169
if (pipe_config->dsc.compression_enable)
31583170
link_bpp_x16 = pipe_config->dsc.compressed_bpp_x16;
@@ -3183,12 +3195,14 @@ intel_dp_compute_config(struct intel_encoder *encoder,
31833195

31843196
intel_dp_audio_compute_config(encoder, pipe_config, conn_state);
31853197

3186-
intel_link_compute_m_n(link_bpp_x16,
3187-
pipe_config->lane_count,
3188-
adjusted_mode->crtc_clock,
3189-
pipe_config->port_clock,
3190-
intel_dp_bw_fec_overhead(pipe_config->fec_enable),
3191-
&pipe_config->dp_m_n);
3198+
if (!intel_dp_is_uhbr(pipe_config)) {
3199+
intel_link_compute_m_n(link_bpp_x16,
3200+
pipe_config->lane_count,
3201+
adjusted_mode->crtc_clock,
3202+
pipe_config->port_clock,
3203+
intel_dp_bw_fec_overhead(pipe_config->fec_enable),
3204+
&pipe_config->dp_m_n);
3205+
}
31923206

31933207
/* FIXME: abstract this better */
31943208
if (pipe_config->splitter.enable)

0 commit comments

Comments
 (0)