linux/drivers/gpu/drm/amd/display/dc/link/protocols
Arthur Heymans 5e08102d1d drm/amd/display: Preserve eDP mode on initial ASSR failure
Commit 56d8ce9d8c ("drm/amd/display: Apply correct panel mode when
reinitializing hardware") made ASSR failure fall back to the default panel
mode unless eDP mode had previously been applied.

However, dc_link is zero-initialized and DP_PANEL_MODE_DEFAULT is zero.
Before the first call to dp_set_panel_mode(), panel_mode therefore looks
like a previously applied default mode. If ASSR setup fails during the
first link training attempt, the driver incorrectly trains the eDP link
using the default scrambling mode.

On a Google Vilboz Chromebook running self-built coreboot firmware and
PSP verstage, this leaves the panel mostly black with corrupted output
along the top edge.

Track whether panel_mode has actually been initialized, and only consult
the saved mode after it has been applied. This retains the recovery
behavior while preserving eDP mode during initial link training.

Fixes: 56d8ce9d8c ("drm/amd/display: Apply correct panel mode when reinitializing hardware")
Assisted-by: Pi:gpt-5.6-sol
Reviewed-by: George Zhang <george.zhang@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit ccb6c2702033f1002b45807fb3cc938760f26f78)
Cc: stable@vger.kernel.org # 6.4.x
2026-10-01 16:38:47 -04:00
..
link_ddc.c drm/amd/display: Enable DCN6 sources compilation 2026-08-06 09:53:32 -04:00
link_ddc.h drm/amd/display: Replace repeated no-native-i2c checks with force_i2c_over_aux field 2026-07-01 11:31:10 -04:00
link_dp_capability.c drm/amd/display: Add dp_skip_rbr flag for NUTMEG 2026-07-15 09:15:37 -04:00
link_dp_capability.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dp_dpia_bw.c drm/amd/display: fix division by zero in get_estimated_bw() 2026-09-02 16:57:38 -04:00
link_dp_dpia_bw.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dp_dpia.c drm/amd/display: Fix narrowing boundaries and eDP parser assignment 2026-04-17 15:41:16 -04:00
link_dp_dpia.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dp_irq_handler.c drm/amd/display: remove duplicate link_dp_panel_replay.h include 2026-07-15 09:15:43 -04:00
link_dp_irq_handler.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dp_panel_replay.c drm/amd/display: Replace repeated no-native-i2c checks with force_i2c_over_aux field 2026-07-01 11:31:10 -04:00
link_dp_panel_replay.h drm/amd/display: init code for external panel replay 2026-01-10 14:21:53 -05:00
link_dp_phy.c drm/amd/display: replace dio encoder access 2025-02-25 11:44:02 -05:00
link_dp_phy.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dp_training_8b_10b.c drm/amd/display: Fix implicit narrowing conversion warnings 2026-04-17 15:41:15 -04:00
link_dp_training_8b_10b.h drm/amd/display: replace dio encoder access 2025-02-25 11:44:02 -05:00
link_dp_training_128b_132b.c drm/amd/display: Fixed Silence complier warnings in dc 2026-03-30 15:12:15 -04:00
link_dp_training_128b_132b.h drm/amd/display: replace dio encoder access 2025-02-25 11:44:02 -05:00
link_dp_training_auxless.c drm/amd/display: replace dio encoder access 2025-02-25 11:44:02 -05:00
link_dp_training_auxless.h
link_dp_training_dpia.c drm/amd/display: Fixed Silence complier warnings in dc 2026-03-30 15:12:15 -04:00
link_dp_training_dpia.h drm/amd/display: Restructure dpia link training 2024-09-18 16:15:07 -04:00
link_dp_training_fixed_vs_pe_retimer.c drm/amd/display: Correct FIXED_VS Link Rate Toggle Condition 2025-12-08 13:56:41 -05:00
link_dp_training_fixed_vs_pe_retimer.h drm/amd/display: Remove Legacy FIXED_VS Transparent LT Sequence 2024-02-07 12:25:51 -05:00
link_dp_training.c drm/amd/display: Fix DP LT failure logging 2026-07-28 18:32:25 -04:00
link_dp_training.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_dpcd.c drm/amd/display: Fixed Silence complier warnings in dc 2026-03-30 15:12:15 -04:00
link_dpcd.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_edp_panel_control.c drm/amd/display: Preserve eDP mode on initial ASSR failure 2026-10-01 16:38:47 -04:00
link_edp_panel_control.h drm/amd/display: revert "write default Vesa Aux backlight control in dmub" 2026-01-10 14:21:53 -05:00
link_hdmi_frl.c drm/amd/display: Ensure dtbclk is enabled 2026-08-06 09:58:19 -04:00
link_hdmi_frl.h drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00
link_hpd.c drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00
link_hpd.h drm/amd/display: refactor HPD to increase flexibility 2025-12-08 13:56:40 -05:00