Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/084e4e05bf25a5dd396dd391014943d42b11c88d.1735912293.git.jani.nikula@intel.com

+24 -10
+24 -10
drivers/gpu/drm/i915/display/intel_dp.c
··· 2519 2519 limits->min_rate = intel_dp_min_link_rate(intel_dp); 2520 2520 limits->max_rate = intel_dp_max_link_rate(intel_dp); 2521 2521 2522 - /* FIXME 128b/132b SST support missing */ 2523 - if (!is_mst) 2522 + /* FIXME 128b/132b SST+DSC support missing */ 2523 + if (!is_mst && dsc) 2524 2524 limits->max_rate = min(limits->max_rate, 810000); 2525 2525 limits->min_rate = min(limits->min_rate, limits->max_rate); 2526 2526 ··· 2638 2638 */ 2639 2639 ret = intel_dp_compute_link_config_wide(intel_dp, pipe_config, 2640 2640 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); 2641 2648 if (ret) 2642 2649 dsc_needed = true; 2643 2650 } ··· 3158 3151 pipe_config->limited_color_range = 3159 3152 intel_dp_limited_color_range(pipe_config, conn_state); 3160 3153 3161 - pipe_config->enhanced_framing = 3162 - drm_dp_enhanced_frame_cap(intel_dp->dpcd); 3154 + if (intel_dp_is_uhbr(pipe_config)) { 3155 + /* 128b/132b SST also needs this */ 3156 + pipe_config->mst_master_transcoder = pipe_config->cpu_transcoder; 3157 + } else { 3158 + pipe_config->enhanced_framing = 3159 + drm_dp_enhanced_frame_cap(intel_dp->dpcd); 3160 + } 3163 3161 3164 3162 if (pipe_config->dsc.compression_enable) 3165 3163 link_bpp_x16 = pipe_config->dsc.compressed_bpp_x16; ··· 3195 3183 3196 3184 intel_dp_audio_compute_config(encoder, pipe_config, conn_state); 3197 3185 3198 - intel_link_compute_m_n(link_bpp_x16, 3199 - pipe_config->lane_count, 3200 - adjusted_mode->crtc_clock, 3201 - pipe_config->port_clock, 3202 - intel_dp_bw_fec_overhead(pipe_config->fec_enable), 3203 - &pipe_config->dp_m_n); 3186 + if (!intel_dp_is_uhbr(pipe_config)) { 3187 + intel_link_compute_m_n(link_bpp_x16, 3188 + pipe_config->lane_count, 3189 + adjusted_mode->crtc_clock, 3190 + pipe_config->port_clock, 3191 + intel_dp_bw_fec_overhead(pipe_config->fec_enable), 3192 + &pipe_config->dp_m_n); 3193 + } 3204 3194 3205 3195 /* FIXME: abstract this better */ 3206 3196 if (pipe_config->splitter.enable)