linux/drivers/gpu/drm/amd/display/dc/link
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
..
accessories drm/amd/display: Avoid DPMS-on for phantom stream 2026-06-03 13:34:31 -04:00
hwss drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00
protocols drm/amd/display: Preserve eDP mode on initial ASSR failure 2026-10-01 16:38:47 -04:00
link_detection.c drm/amd/display: Enable DCN6 sources compilation 2026-08-06 09:53:32 -04:00
link_detection.h drm/amd/display: Fix warnings 2026-05-11 16:10:34 -04:00
link_dpms.c drm/amd/display: Silence link_dpms I2C retimer failures 2026-07-28 19:17:33 -04:00
link_dpms.h drm/amd/display: Split DPMS ON into parts 2026-07-28 18:33:26 -04:00
link_factory.c drm/amd/display: Fix HPD consideration for VGA/LVDS connectors on DCE 2026-08-25 18:20:00 -04:00
link_factory.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_hwss_hpo_frl.c
link_resource.c
link_resource.h drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
link_validation.c drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00
link_validation.h drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00
Makefile drm/amd/display: Add DC link support for FRL 2026-06-03 13:44:44 -04:00