* [PATCH] drm/amd/display: Preserve eDP mode on initial ASSR failure
@ 2026-09-12 15:11 Arthur Heymans
2026-09-18 18:08 ` Alex Hung
0 siblings, 1 reply; 2+ messages in thread
From: Arthur Heymans @ 2026-09-12 15:11 UTC (permalink / raw)
To: amd-gfx
Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, michael.mityushkin, nicholas.kazlauskas,
qingqing.zhuo, dri-devel, linux-kernel, Arthur Heymans, stable
Commit 56d8ce9d8c17 ("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: 56d8ce9d8c17 ("drm/amd/display: Apply correct panel mode when reinitializing hardware")
Cc: stable@vger.kernel.org # v6.4+
Assisted-by: Pi:gpt-5.6-sol
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
---
drivers/gpu/drm/amd/display/dc/dc.h | 1 +
.../amd/display/dc/link/protocols/link_edp_panel_control.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 4ecd5699ac5e..0db55a73da0c 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -1912,6 +1912,7 @@ struct dc_scratch_space {
struct ddc_service *ddc;
enum dp_panel_mode panel_mode;
+ bool panel_mode_initialized;
bool aux_mode;
/* Private to DC core */
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
index 9883216dcc9d..cd90576bc6f0 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
@@ -93,6 +93,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
}
link->panel_mode = panel_mode;
+ link->panel_mode_initialized = true;
DC_LOG_DETECTION_DP_CAPS("%d eDP panel mode supported: %d, enabled: %d\n",
link->link_index,
link->dpcd_caps.panel_mode_edp,
@@ -1300,7 +1301,8 @@ void edp_set_panel_assr(struct dc_link *link, struct pipe_ctx *pipe_ctx,
result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
- if (!result && link->panel_mode != DP_PANEL_MODE_EDP)
+ if (!result && link->panel_mode_initialized &&
+ link->panel_mode != DP_PANEL_MODE_EDP)
*panel_mode = DP_PANEL_MODE_DEFAULT;
}
}
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: Preserve eDP mode on initial ASSR failure
2026-09-12 15:11 [PATCH] drm/amd/display: Preserve eDP mode on initial ASSR failure Arthur Heymans
@ 2026-09-18 18:08 ` Alex Hung
0 siblings, 0 replies; 2+ messages in thread
From: Alex Hung @ 2026-09-18 18:08 UTC (permalink / raw)
To: Arthur Heymans, amd-gfx
Cc: harry.wentland, sunpeng.li, siqueira, alexander.deucher,
christian.koenig, michael.mityushkin, nicholas.kazlauskas,
qingqing.zhuo, dri-devel, linux-kernel, stable, Zhang, George
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 9/12/26 09:11, Arthur Heymans wrote:
> [Some people who received this message don't often get email from arthur@aheymans.xyz. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Commit 56d8ce9d8c17 ("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: 56d8ce9d8c17 ("drm/amd/display: Apply correct panel mode when reinitializing hardware")
> Cc: stable@vger.kernel.org # v6.4+
> Assisted-by: Pi:gpt-5.6-sol
> Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
> ---
> drivers/gpu/drm/amd/display/dc/dc.h | 1 +
> .../amd/display/dc/link/protocols/link_edp_panel_control.c | 4 +++-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
> index 4ecd5699ac5e..0db55a73da0c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc.h
> +++ b/drivers/gpu/drm/amd/display/dc/dc.h
> @@ -1912,6 +1912,7 @@ struct dc_scratch_space {
> struct ddc_service *ddc;
>
> enum dp_panel_mode panel_mode;
> + bool panel_mode_initialized;
> bool aux_mode;
>
> /* Private to DC core */
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
> index 9883216dcc9d..cd90576bc6f0 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
> @@ -93,6 +93,7 @@ void dp_set_panel_mode(struct dc_link *link, enum dp_panel_mode panel_mode)
> }
>
> link->panel_mode = panel_mode;
> + link->panel_mode_initialized = true;
> DC_LOG_DETECTION_DP_CAPS("%d eDP panel mode supported: %d, enabled: %d\n",
> link->link_index,
> link->dpcd_caps.panel_mode_edp,
> @@ -1300,7 +1301,8 @@ void edp_set_panel_assr(struct dc_link *link, struct pipe_ctx *pipe_ctx,
>
> result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
>
> - if (!result && link->panel_mode != DP_PANEL_MODE_EDP)
> + if (!result && link->panel_mode_initialized &&
> + link->panel_mode != DP_PANEL_MODE_EDP)
> *panel_mode = DP_PANEL_MODE_DEFAULT;
> }
> }
> --
> 2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-18 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-12 15:11 [PATCH] drm/amd/display: Preserve eDP mode on initial ASSR failure Arthur Heymans
2026-09-18 18:08 ` Alex Hung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®