From: sashiko-bot@kernel.org
To: "Daniel Campos Ramos" <Capitain_Jack@yahoo.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/nouveau: pass HDMI GCP deep-color state through NVIF
Date: Tue, 22 Sep 2026 19:29:21 +0000 [thread overview]
Message-ID: <20260922192921.BA4471F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922192132.114546-3-Capitain_Jack@yahoo.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/nouveau: missing 30-bpp GCP configuration in nv50_hdmi_enable()
--
commit a5a312ee20dba0d1f27e5316dc3d7c1c29070995
Author: Daniel Campos Ramos <Capitain_Jack@yahoo.com>
Subject: drm/nouveau: pass HDMI GCP deep-color state through NVIF
This commit adds HDMI GCP color depth and pixel packing phase configuration
to Nouveau to support 30, 36, and 48-bpp RGB links. It extends the NVIF
HDMI method to pass and cache these values for generation-specific writers.
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
[ ... ]
> @@ -826,6 +827,19 @@ nv50_hdmi_enable(struct drm_encoder *encoder, struct nouveau_crtc *nv_crtc,
> max_ac_packet -= 18; /* constant from tegra */
> max_ac_packet /= 32;
>
> + /* Match NVIDIA's 36-bpp GCP construction and extend the same HDMI
> + * color-depth encoding to 48-bpp. 48-bpp groups contain one pixel,
> + * so their last packing phase is phase 4 (zero).
> + */
> + if (bpc == 16) {
> + gcp_cd = 7;
> + } else if (bpc == 12) {
> + const u32 hbp = mode->crtc_hblank_end - mode->crtc_hsync_end;
> +
> + gcp_cd = 6;
> + gcp_pp = ((mode->crtc_hdisplay + hbp) & 1) ? 1 : 2;
> + }
> +
[Severity: High]
Does this code omit the configuration for 30-bpp (10 bpc) HDMI streams?
If a monitor supports 30-bit deep color (DRM_EDID_HDMI_DC_30), asyh->or.bpc
is set to 10 in nv50_sor_atomic_enable() and passed here as bpc = 10.
When bpc == 10, gcp_cd and gcp_pp are left as 0, which means "not indicated"
and assumes a 24-bpp standard color depth.
Could this cause a corrupted or unreadable display output on 10-bit color
monitors by violating the HDMI specification for Deep Color?
> if (nv_encoder->i2c && hdmi->scdc.scrambling.supported) {
> const bool high_tmds_clock_ratio = mode->clock > 340000;
> u8 scdc;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260922192132.114546-1-Capitain_Jack@yahoo.com?part=2
next prev parent reply other threads:[~2026-09-22 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260922192132.114546-1-Capitain_Jack.ref@yahoo.com>
2026-09-22 19:21 ` [PATCH 0/3] drm/nouveau: HDMI Deep Color link depth (30/36/48 bpp) Daniel Campos Ramos
2026-09-22 19:21 ` [PATCH 1/3] drm/nouveau: select HDMI deep-color link depth Daniel Campos Ramos
2026-09-22 19:39 ` sashiko-bot
2026-09-22 22:26 ` Daniel Campos Ramos
2026-09-22 19:21 ` [PATCH 2/3] drm/nouveau: pass HDMI GCP deep-color state through NVIF Daniel Campos Ramos
2026-09-22 19:29 ` sashiko-bot [this message]
2026-09-22 19:21 ` [PATCH 3/3] drm/nouveau: program HDMI deep-color GCP fields Daniel Campos Ramos
2026-09-22 22:07 ` [PATCH 0/3] drm/nouveau: HDMI Deep Color link depth (30/36/48 bpp) Daniel Campos Ramos
2026-09-23 15:48 ` lyude
2026-09-23 16:33 ` Daniel Campos Ramos
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=20260922192921.BA4471F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Capitain_Jack@yahoo.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox