dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: rh_king@163.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/dc: Avoid PSR AUX WARN on unhealthy eDP link
Date: Mon, 17 Aug 2026 03:21:33 +0000	[thread overview]
Message-ID: <20260817032134.4D3381F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260817031640.2097973-1-rh_king@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The function `dpcd_set_link_settings()` returns an uninitialized `status` variable on its success path.
--

--- Patch [1]: [PATCH] drm/amdgpu/dc: Avoid PSR AUX WARN on unhealthy eDP link ---
commit ea92b689001bf0ca86b430f7c8b3fa5b47810b12
Author: Kean Ren <rh_king@163.com>

drm/amdgpu/dc: Avoid PSR AUX WARN on unhealthy eDP link

This commit fixes PSR AUX WARNs on unhealthy eDP links by returning early
from dpcd_set_link_settings() on the first DPCD write failure, and by
short-circuiting edp_setup_psr() when the link is inactive.

> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> index 04eedec8a230c..501d2556e06c5 100644
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
> @@ -1097,6 +1097,7 @@ enum dc_status dpcd_set_link_settings(
>  {
>  	uint8_t rate;
>  	enum dc_status status;
> +	enum dc_status result;

[Severity: High]
Since the assignments in this function were changed from status to result,
is status left uninitialized?

If all DPCD writes succeed, the function completes by returning status at the
end of the function:

dpcd_set_link_settings() {
    ...
    return status;
}

Does this cause dpcd_set_link_settings() to return random stack memory on the
success path, potentially causing callers to interpret a success as an error
and fail the display initialization?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260817031640.2097973-1-rh_king@163.com?part=1

  reply	other threads:[~2026-08-17  3:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  3:16 [PATCH] drm/amdgpu/dc: Avoid PSR AUX WARN on unhealthy eDP link rh_king
2026-08-17  3:21 ` sashiko-bot [this message]
2026-08-18  2:42 ` [PATCH v2] " rh_king
2026-08-18  3:03   ` sashiko-bot

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=20260817032134.4D3381F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rh_king@163.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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