On Fri, 20 Nov 2026, Arun R Murthy <[email protected]> wrote:
> Enable symbol TG for 8b/10b MST and 128b/132b SST/MST on the platforms
> supporting it.
>
> Keep a debugfs knob, enable_dp_symbol_tg, to still select the pixel based
> timing generator, for the case of a sink having issues with the symbol
> based one, or for debugging purpose.
>
> Signed-off-by: Arun R Murthy <[email protected]>
> ---
> .../gpu/drm/i915/display/intel_display_params.h | 6 ++++
> drivers/gpu/drm/i915/display/intel_dp.c | 32
> ++++++++++------------
> 2 files changed, 21 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h
> b/drivers/gpu/drm/i915/display/intel_display_params.h
> index
> 5c5a1a1358c32a08a460bdb81da76c3682827ab9..503eef8cf744fbf802bcf86d25f581871fcc3f8c
> 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_params.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_params.h
> @@ -56,6 +56,12 @@ struct drm_printer;
> * in intel_display_params.c on purpose. Runtime-toggle via debugfs.
> */ \
> param(bool, enable_periodic_assdp, false, 0600) \
> + /*
> + * Debugfs-only knob (per-device), to fall back to the pixel based DP
> timing
> + * generator, if a sink has issues with the symbol based one. Applies
> to the
> + * next modeset or mode validation.
> + */ \
I'm not really convinced about this at all, including the previous one
added in commit 9ed39b7d74b4 ("drm/i915/display: Gate periodic AS SDP
skip frames behind a debugfs knob").
The idea here is that these match 1:1 with module parameters. Everything
else probably should get added through the usual debugfs mechanisms.
BR,
Jani.
> + param(bool, enable_dp_symbol_tg, true, 0600) \
>
> #define MEMBER(T, member, ...) T member;
> struct intel_display_params {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index
> 217b5d1e082f2bb9ee15773e382c528700671584..d312b82253b89359958ac326121121c0ef225e97
> 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1271,13 +1271,13 @@ bool intel_dp_has_dsc(const struct intel_connector
> *connector)
> }
>
> /*
> - * The symbol based timing generator is to be used for 8b/10b MST and
> 128b/132b
> - * SST/MST, but only once all the pieces needed for that are in place, which
> is
> - * done by a later patch.
> + * The symbol based timing generator is used for 8b/10b MST and 128b/132b
> + * SST/MST, unless disabled by the enable_dp_symbol_tg debugfs knob.
> */
> bool intel_dp_use_symbol_tg(struct intel_display *display, bool is_mst, bool
> is_uhbr)
> {
> - return false;
> + return HAS_DP_SYMBOL_TG(display) && display->params.enable_dp_symbol_tg
> &&
> + (is_mst || is_uhbr);
> }
>
> static int
> @@ -4004,7 +4004,7 @@ int intel_dp_compute_symbol_tg(struct intel_dp
> *intel_dp,
>
> /* MSO is only used with 8b/10b SST, where the symbol TG isn't used */
> if (drm_WARN_ON(display->drm, crtc_state->splitter.enable))
> - return 0;
> + return -EINVAL;
>
> ret = intel_dp_compute_dsc_slices_and_link_bpp(crtc_state, connector,
> &dsc_slices,
> &link_bpp_x16);
> @@ -4019,12 +4019,11 @@ int intel_dp_compute_symbol_tg(struct intel_dp
> *intel_dp,
> hblank_cycles = cycles.hblank;
> chunk_cycles = cycles.chunk;
>
> - if (!intel_dp_symbol_tg_cycles_in_range(&cycles)) {
> - drm_dbg_kms(display->drm,
> - "LL symbol timings out of range (hactive %d, hblank
> %d, chunk %d), using pixel TG\n",
> - hactive_cycles, hblank_cycles, chunk_cycles);
> - return 0;
> - }
> + /* The link config search already checked that the timings fit. */
> + if (drm_WARN(display->drm, !intel_dp_symbol_tg_cycles_in_range(&cycles),
> + "LL symbol timings out of range (hactive %d, hblank %d,
> chunk %d)\n",
> + hactive_cycles, hblank_cycles, chunk_cycles))
> + return -EINVAL;
>
> if (is_uhbr) {
> ch_num = 1568768;
> @@ -4077,12 +4076,11 @@ int intel_dp_compute_symbol_tg(struct intel_dp
> *intel_dp,
> (u64)ch_num * (ssc_num / ssc_gcd),
> data_n[ssc]);
>
> - if (intel_dp_cmp_u128(data_m[ssc], data_n[ssc]) > 0) {
> - drm_dbg_kms(display->drm,
> - "LL symbol data M/N ratio exceeds 1.0 (SSC
> %s), using pixel TG\n",
> - str_enabled_disabled(ssc));
> - return 0;
> - }
> + /* The link config search already checked that the stream fits.
> */
> + if (drm_WARN(display->drm, intel_dp_cmp_u128(data_m[ssc],
> data_n[ssc]) > 0,
> + "LL symbol data M/N ratio exceeds 1.0 (SSC %s)\n",
> + str_enabled_disabled(ssc)))
> + return -EINVAL;
> }
>
> tg->enable = true;
--
Jani Nikula, Intel