All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Paunovic <royalnet026@gmail.com>
To: nlucasgit@gmail.com
Cc: Igor Paunovic <royalnet026@gmail.com>,
	amd-gfx@lists.freedesktop.org, harry.wentland@amd.com,
	sunpeng.li@amd.com, siqueira@igalia.com,
	alexander.deucher@amd.com, joshua@froggi.es, mwen@igalia.com,
	leorize+oss@disroot.org, alex.hung@amd.com,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices for DCE
Date: Mon,  3 Aug 2026 17:25:33 +0200	[thread overview]
Message-ID: <20260803152533.9008-1-royalnet026@gmail.com> (raw)
In-Reply-To: <15b28cafab1b55f3e4cad9bb542847d22e776bda.1785616749.git.nlucasgit@gmail.com>

Hi Nathan,

I hit exactly this on a DCE 11.2 part, so here is a data point for the
path you could not test.

Setup: XFX RX 580 8GB (Polaris10, DCE 11.2) as an external GPU on an
Orange Pi 5 Plus (RK3588, arm64) over PCIe Gen3 x4, driving a Sony 65"
HDR10 TV at 3840x2160@60 with HDR enabled under KWin/Wayland. The sink
lists 3840x2160@60 only in its YCbCr 4:2:0 video data block and caps
TMDS at 300 MHz, so the stream comes out as PIXEL_ENCODING_YCBCR420
(confirmed in hardware: FMT_CONTROL = 0x002a0000, FMT_PIXEL_ENCODING = 2),
and with the compositor setting Colorspace=BT2020_RGB the output color
space ends up COLOR_SPACE_2020_YCBCR_LIMITED.

My tree predates 51e6668ab4ba, so global_color_matrix[] had no BT.2020
row at all. That is worth recording as its own failure mode: with no
matching entry, dce110_opp_set_csc_default() programs no matrix and
configure_graphics_mode() leaves OUTPUT_CSC_GRPH_MODE at 0, so the
output CSC stays bypassed and plain RGB is fed to the 4:2:0 formatter
while the AVI infoframe declares YCbCr 4:2:0 with BT.2020 colorimetry.
The sink then applies a BT.2020 YCbCr to RGB matrix to RGB data: luma
lands on green, Cb/Cr sit near mid scale, and the picture is washed out
with a heavy green cast. SDR on the same link was fine, since it stays
on the BT.709 entry.

Applying 51e6668ab4ba plus this series on top of 7.0 fixes it: colors
are correct on that TV in HDR, across a reboot, with no amdgpu errors in
the log. As a cross-check, the same desktop on a second monitor driven
by a completely different pipeline (the SoC's own display controller)
now matches it.

I also booted 51e6668ab4ba without this series on the same setup and
could not tell the two apart by eye. That is not a counter-argument to
the fix, just a note on sensitivity: the compositor maps SDR content to
around 350 nits, so nothing gets near the top of the PQ range where the
full-range luma scaling would clip, and the residual difference stays
below what this TV's processing reveals.

Tested-by: Igor Paunovic <royalnet026@gmail.com>

Thanks,
Igor

  reply	other threads:[~2026-08-03 15:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02 14:35 [PATCH 0/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices Nathan Lucas
2026-08-02 14:35 ` [PATCH 1/2] drm/amd/display: fix BT.2020 YCbCr limited output CSC matrix Nathan Lucas
2026-08-02 14:35 ` [PATCH 2/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices for DCE Nathan Lucas
2026-08-03 15:25   ` Igor Paunovic [this message]
2026-08-05 13:55     ` Nathan Lucas
2026-08-10 19:16 ` [PATCH 0/2] drm/amd/display: fix BT.2020 YCbCr output CSC matrices Alex Deucher

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=20260803152533.9008-1-royalnet026@gmail.com \
    --to=royalnet026@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=joshua@froggi.es \
    --cc=leorize+oss@disroot.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwen@igalia.com \
    --cc=nlucasgit@gmail.com \
    --cc=siqueira@igalia.com \
    --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 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.