From: sashiko-bot@kernel.org
To: "Stephen via B4 Relay" <devnull+stevester.codes.gmail.com@kernel.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RFC 3/3] drm/amd/display: use HDMI RGB deep color for PCONs
Date: Sat, 20 Jun 2026 16:19:13 +0000 [thread overview]
Message-ID: <20260620161914.01D751F00A3E@smtp.kernel.org> (raw)
In-Reply-To: <20260620-ch7218-rfc-v1-b4-v1-3-3412debf44b6@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing DP-to-HDMI PCON capability check for deep color configuration causes atomic check failures.
- [Medium] PCON detection logic fails to correctly identify HDMI ports on MST hubs, excluding them from deep color support.
--
commit 2c95bd6347ca4e92cbbbdffd678f070e97b84a9d
Author: Stephen <stevester.codes@gmail.com>
drm/amd/display: use HDMI RGB deep color for PCONs
This commit updates the DRM AMD display driver to support HDMI RGB deep color
for PCON connectors. It derives the candidate bpc from edid_hdmi_rgb444_dc_modes
when an RGB output is routed through a recognized DP-to-HDMI converter.
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index f8c13bad4ac23..02ffc1563e699 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
[ ... ]
> @@ -6582,22 +6582,44 @@ static void update_stream_scaling_settings(struct drm_device *dev,
>
> static enum dc_color_depth
> convert_color_depth_from_display_info(const struct drm_connector *connector,
> - bool is_y420, int requested_bpc)
> + enum dc_pixel_encoding pixel_encoding,
> + int requested_bpc)
> {
> + const struct drm_display_info *info = &connector->display_info;
> + bool is_hdmi_pcon = false;
> u8 bpc;
>
> - if (is_y420) {
> + if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) {
> + const struct amdgpu_dm_connector *aconnector =
> + to_amdgpu_dm_connector(connector);
> +
> + is_hdmi_pcon = aconnector->dc_link &&
> + aconnector->dc_link->dpcd_caps.dongle_type ==
> + DISPLAY_DONGLE_DP_HDMI_CONVERTER;
[Severity: Medium]
For MST leaf connectors, aconnector->dc_link represents the primary link
to the MST hub rather than the downstream leaf port.
Since the root link typically identifies as a branch device, will this
evaluate to false for MST setups and exclude HDMI sinks connected via
MST hubs from deep color support?
> + }
> +
> + if (pixel_encoding == PIXEL_ENCODING_YCBCR420) {
> bpc = 8;
>
> /* Cap display bpc based on HDMI 2.0 HF-VSDB */
> - if (connector->display_info.hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_48)
> + if (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_48)
> + bpc = 16;
> + else if (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36)
> + bpc = 12;
> + else if (info->hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)
> + bpc = 10;
> + } else if (pixel_encoding == PIXEL_ENCODING_RGB && is_hdmi_pcon) {
> + bpc = 8;
> +
> + /* The downstream sink is HDMI even though DRM exposes DP. */
> + if (info->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_48)
> bpc = 16;
> - else if (connector->display_info.hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_36)
> + else if (info->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_36)
> bpc = 12;
> - else if (connector->display_info.hdmi.y420_dc_modes & DRM_EDID_YCBCR420_DC_30)
> + else if (info->edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30)
> bpc = 10;
[Severity: High]
This logic sets the bpc based on the downstream HDMI sink's capabilities, but
does it also need to be constrained by the PCON's maximum bpc limit?
If a sink supports 12 bpc but the PCON only supports 8 bpc, will skipping a
check against aconnector->dc_link->dpcd_caps.dongle_caps.dp_hdmi_max_bpc
cause dp_active_dongle_validate_timing() to fail and reject the atomic commit?
> } else {
> - bpc = (uint8_t)connector->display_info.bpc;
> + bpc = (uint8_t)info->bpc;
> /* Assume 8 bpc by default if no bpc is specified. */
> bpc = bpc ? bpc : 8;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260620-ch7218-rfc-v1-b4-v1-1-3412debf44b6@gmail.com?part=3
prev parent reply other threads:[~2026-06-20 16:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 16:06 [PATCH RFC 1/3] drm/amd/display: quirk malformed CH7218 PCON topology Stephen via B4 Relay
2026-06-20 16:06 ` Stephen
2026-06-20 16:06 ` [PATCH RFC 2/3] drm/amd/display: quirk CH7218 DP DSC support bit Stephen via B4 Relay
2026-06-20 16:06 ` Stephen
2026-06-20 16:06 ` [PATCH RFC 3/3] drm/amd/display: use HDMI RGB deep color for PCONs Stephen via B4 Relay
2026-06-20 16:06 ` Stephen
2026-06-20 16:19 ` sashiko-bot [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=20260620161914.01D751F00A3E@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+stevester.codes.gmail.com@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--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 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.