]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/display: add workaround flag to link to force FFE preset
authorBrendan Tam <Brendan.Tam@amd.com>
Thu, 23 Jan 2025 16:25:16 +0000 (11:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:17:48 +0000 (10:17 +0200)
[ Upstream commit 51d1b338541dea83fec8e6f95d3e46fa469a73a8 ]

[Why]
There have been instances of some monitors being unable to link train on
their reported link speed using their selected FFE preset. If a different
FFE preset is found that has a higher rate of success during link training
this workaround can be used to force its FFE preset.

[How]
A new link workaround flag is made called force_dp_ffe_preset. The flag is
checked in override_training_settings and will set lt_settings->ffe_preset
which is null if the flag is not set. The flag is then set in
override_lane_settings.

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Brendan Tam <Brendan.Tam@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c

index 08c5a315b3a6737b527e8c7d3e3579fd3b8bdb5c..1e1633b7771c543cd218215a90ee3ef42d72cc0e 100644 (file)
@@ -1780,7 +1780,9 @@ struct dc_link {
                bool dongle_mode_timing_override;
                bool blank_stream_on_ocs_change;
                bool read_dpcd204h_on_irq_hpd;
+               bool force_dp_ffe_preset;
        } wa_flags;
+       union dc_dp_ffe_preset forced_dp_ffe_preset;
        struct link_mst_stream_allocation_table mst_stream_alloc_table;
 
        struct dc_link_status link_status;
index 754c895e1bfbde5b144ef1ed5cdcbd1e129c46d9..09024a8bac128a1d4d0b854a4452aff10beb3d44 100644 (file)
@@ -736,6 +736,8 @@ void override_training_settings(
                lt_settings->pre_emphasis = overrides->pre_emphasis;
        if (overrides->post_cursor2 != NULL)
                lt_settings->post_cursor2 = overrides->post_cursor2;
+       if (link->wa_flags.force_dp_ffe_preset && !dp_is_lttpr_present(link))
+               lt_settings->ffe_preset = &link->forced_dp_ffe_preset;
        if (overrides->ffe_preset != NULL)
                lt_settings->ffe_preset = overrides->ffe_preset;
        /* Override HW lane settings with BIOS forced values if present */