From: Robert Mader <robert.mader@collabora.com>
To: Harry Wentland <harry.wentland@amd.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH v3 10/11] drm/amd/display: Set COLOR_SPACE_SRGB when fixed matrix colorop is bypassed
Date: Fri, 3 Jul 2026 12:40:31 +0200 [thread overview]
Message-ID: <eae10264-51ef-4e0b-9774-a694bc7f95b6@collabora.com> (raw)
In-Reply-To: <20260623164812.81110-11-harry.wentland@amd.com>
Hi,
On 23.06.26 18:48, Harry Wentland wrote:
> When the fixed matrix colorop is bypassed, the color_space was set to
> COLOR_SPACE_UNKNOWN (0). In DC's DPP setup (dpp1_cnv_setup), the logic
> 'input_color_space ? input_color_space : color_space' treats 0 as
> 'not provided', causing it to fall back to the format-based default of
> COLOR_SPACE_YCBCR709 for YUV framebuffers. This results in an implicit
> YUV-to-RGB conversion via ICSC even when a color pipeline is active and
> the fixed matrix is bypassed.
shouldn't a commit with YUV framebuffer and fixed matrix set to bypass
always fail, like it does in the VKMS implementation?
If this commit is only needed for RGB formats, somehow getting a
YUV-to-RGB conversion applied to them otherwise, then I think the commit
message should be clarified accordingly, no?
>
> Fix this by setting COLOR_SPACE_SRGB (1) instead. This is non-zero, so
> it overrides the format default. The SRGB entry in dpp_input_csc_matrix
> is an identity matrix, so ICSC performs no actual conversion, which is
> the correct behavior when the fixed matrix colorop is bypassed.
>
> Cc: stable@vger.kernel.org
> Fixes: 93d922f4833b ("drm/amd/display: Implement fixed matrix colorop color space mapping")
> Assisted-by: Copilot:claude-opus-4.6
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> index 561ee9a2e749..984bbfcf23f0 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
> @@ -1534,7 +1534,7 @@ __set_dm_plane_colorop_fixed_matrix(struct drm_plane_state *plane_state,
> return -EINVAL;
>
> if (colorop_state->bypass) {
> - dc_plane_state->color_space = COLOR_SPACE_UNKNOWN;
> + dc_plane_state->color_space = COLOR_SPACE_SRGB;
> return 0;
> }
>
--
Robert Mader
Consultant Software Developer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718
next prev parent reply other threads:[~2026-07-03 10:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 16:48 [PATCH v3 00/11] YUV conversion colorop with amdgpu and VKMS Harry Wentland
2026-06-23 16:48 ` [PATCH v3 01/11] drm/colorop: Add DRM_COLOROP_FIXED_MATRIX Harry Wentland
2026-07-03 10:15 ` Robert Mader
2026-07-03 10:52 ` Pekka Paalanen
2026-06-23 16:48 ` [PATCH v3 02/11] drm/colorop: Add limited-range YUV-to-RGB fixed matrix enum values Harry Wentland
2026-07-03 10:17 ` Robert Mader
2026-06-23 16:48 ` [PATCH v3 03/11] drm/vkms: Add fixed matrix colorop to color pipeline Harry Wentland
2026-07-03 10:24 ` Robert Mader
2026-06-23 16:48 ` [PATCH v3 04/11] drm/vkms: Add atomic check and matrix handling for fixed matrix colorop Harry Wentland
2026-07-03 10:32 ` Robert Mader
2026-06-23 16:48 ` [PATCH v3 05/11] drm/amd/display: Add fixed matrix colorop to color pipeline Harry Wentland
2026-06-23 16:48 ` [PATCH v3 06/11] drm/amd/display: Implement fixed matrix colorop color space mapping Harry Wentland
2026-06-23 16:48 ` [PATCH v3 07/11] drm/amd/display: Use GAMCOR for first TF if YUV conversion is needed Harry Wentland
2026-06-23 16:48 ` [PATCH v3 08/11] drm/amd/display: Check actual state during commit_tail Harry Wentland
2026-06-23 16:48 ` [PATCH v3 09/11] drm/amd/display: Set color_space to plane_infos Harry Wentland
2026-06-23 16:48 ` [PATCH v3 10/11] drm/amd/display: Set COLOR_SPACE_SRGB when fixed matrix colorop is bypassed Harry Wentland
2026-07-03 10:40 ` Robert Mader [this message]
2026-06-23 16:48 ` [PATCH v3 11/11] drm/amd/display: Force GAMCOR for subsampled surfaces with PQ/Gamma22/HLG Harry Wentland
2026-07-03 9:44 ` [PATCH v3 00/11] YUV conversion colorop with amdgpu and VKMS Robert Mader
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=eae10264-51ef-4e0b-9774-a694bc7f95b6@collabora.com \
--to=robert.mader@collabora.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=stable@vger.kernel.org \
/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.