From: sashiko-bot@kernel.org
To: "Jackie Dong" <xy-jackie@139.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/display:Check dp_128b_132b_supported_link_rates.raw before link_rate setting
Date: Tue, 30 Jun 2026 15:11:47 +0000 [thread overview]
Message-ID: <20260630151147.CB9631F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630145955.13994-1-xy-jackie@139.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Checking `dp_128b_132b_supported_link_rates.raw` before it is read from the DPCD register completely disables DP 2.0 UHBR support.
--
commit 11d06153280ec5dae6682a402606818b4f84b79d
Author: Jackie Dong <xy-jackie@139.com>
drm/amd/display:Check dp_128b_132b_supported_link_rates.raw before link_rate setting
This patch modifies the DP 128b/132b capability check to also verify that
dp_128b_132b_supported_link_rates.raw is non-zero before attempting to read
and parse the specific UHBR link rates.
> diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> +++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
> @@ -2079,7 +2079,8 @@ static bool retrieve_link_cap(struct dc_link *link)
> if (!dpcd_read_sink_ext_caps(link))
> link->dpcd_sink_ext_caps.raw = 0;
>
> - if (link->dpcd_caps.channel_coding_cap.bits.DP_128b_132b_SUPPORTED) {
> + if (link->dpcd_caps.channel_coding_cap.bits.DP_128b_132b_SUPPORTED &&
> + link->dpcd_caps.dp_128b_132b_supported_link_rates.raw) {
[Severity: High]
Will this change completely disable DP 2.0 UHBR support?
In retrieve_link_cap() in drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c,
dp_128b_132b_supported_link_rates.raw is now checked before it is actually
read from the DPCD register. Since the dc_link struct is zero-initialized and
the read hasn't occurred yet, won't this raw value always evaluate to 0 upon
connection of any DP 2.0 monitor?
This would cause the if condition to always fail, bypassing the actual read
block below and permanently preventing UHBR feature detection.
> DC_LOG_DP2("128b/132b encoding is supported at link %d", link->link_index);
>
> /* Read 128b/132b suppoerted link rates */
> core_link_read_dpcd(link,
> DP_128B132B_SUPPORTED_LINK_RATES,
> &link->dpcd_caps.dp_128b_132b_supported_link_rates.raw,
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260630145955.13994-1-xy-jackie@139.com?part=1
next prev parent reply other threads:[~2026-06-30 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 14:59 [PATCH] drm/amd/display:Check dp_128b_132b_supported_link_rates.raw before link_rate setting Jackie Dong
2026-06-30 15:11 ` sashiko-bot [this message]
2026-07-01 1:45 ` Jackie Dong
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=20260630151147.CB9631F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xy-jackie@139.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.