mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Arthur Heymans <arthur@aheymans.xyz>, amd-gfx@lists.freedesktop.org
Cc: harry.wentland@amd.com, sunpeng.li@amd.com, siqueira@igalia.com,
	alexander.deucher@amd.com, christian.koenig@amd.com,
	michael.mityushkin@amd.com, nicholas.kazlauskas@amd.com,
	qingqing.zhuo@amd.com, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Zhang,
	George" <George.Zhang@amd.com>
Subject: Re: [PATCH] drm/amd/display: Preserve eDP mode on initial ASSR failure
Date: Fri, 18 Sep 2026 12:08:55 -0600	[thread overview]
Message-ID: <18a8b7ee-d588-48be-bfe4-0b79309e3339@amd.com> (raw)
In-Reply-To: <20260912151137.3913987-1-arthur@aheymans.xyz>

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


      reply	other threads:[~2026-09-18 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 15:11 Arthur Heymans
2026-09-18 18:08 ` Alex Hung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18a8b7ee-d588-48be-bfe4-0b79309e3339@amd.com \
    --to=alex.hung@amd.com \
    --cc=George.Zhang@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arthur@aheymans.xyz \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.mityushkin@amd.com \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=qingqing.zhuo@amd.com \
    --cc=siqueira@igalia.com \
    --cc=stable@vger.kernel.org \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®