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: Alex Hung <alex.hung@amd.com>,
Daniel Stone <daniels@collabora.com>,
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
Uma Shankar <uma.shankar@intel.com>,
Louis Chauvet <louis.chauvet@bootlin.com>,
Melissa Wen <mwen@igalia.com>, Simon Ser <contact@emersion.fr>
Subject: Re: [PATCH v3 00/11] YUV conversion colorop with amdgpu and VKMS
Date: Thu, 9 Jul 2026 16:33:02 +0200 [thread overview]
Message-ID: <f5cbdbef-d76f-4ffb-983c-5bb22d40a3b2@collabora.com> (raw)
In-Reply-To: <20260623164812.81110-1-harry.wentland@amd.com>
Hi,
in a related discussion in
https://lore.kernel.org/dri-devel/d42d5750-f3c5-4e2b-baa3-514b87e59e86@linux.intel.com/
Maarten suggested that - given that the new Fixed Matrix colorop
effectively provides a drop-in replacement for the legacy properties -
it would be nice to have a helper that automatically provides support
for the legacy properties for drivers implementing the new color op.
That'd allow drivers a cleaner switch to the new API, keeping legacy
support for free.
Harry, WDYT, would that be an option for the two implementations here?
Best regards
On 23.06.26 18:48, Harry Wentland wrote:
> When we merged the drm_plane color pipeline API the major gap
> that existed was the lack of a YUV to RGB conversion colorop.
> We deprecated any legacy drm_plane color properties, which
> means that the COLOR_RANGE and COLOR_ENCODING properties can't
> be used with the COLOR_PIPELINE property on a drm_plane. In
> practice this means that we can't use a COLOR_PIPELINE on
> YCbCr encoded framebuffers.
>
> This patchset expands on the Fixed Matrix colorop proposed by Chaitanya
> and adds limited range variants of the YCbCr to RGB conversions.
>
> His full patchset can be found at
> https://patchwork.freedesktop.org/patch/709860
>
> This code has been tested with IGT and an experimental KWin branch.
>
> IGT branch:
> https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/yuv-fm-colorop
>
> KWin branch used for testing:
> https://invent.kde.org/hwentlan/kwin/-/tree/yuv-fm-colorop
>
> The kernel branch containing these changes, based on drm-misc-next
> can be found at:
> https://gitlab.freedesktop.org/hwentland/linux/-/tree/yuv-fm-colorop
>
> Further background on this work can be found at:
> https://hwentland.github.io/2026/03/10/plane-color-pipeline-csc-3d-lut-kwin.html
>
> v3:
> - base on Chaitanya's updated patch and rename code accordingly
> to Fixed_Matrix instead of CSC Fixed-Function
>
> v2:
> - use Chaitanya's CSC_FF block for named matrices
>
> Cc: Alex Hung <alex.hung@amd.com>
> Cc: Daniel Stone <daniels@collabora.com>
> Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> Cc: Uma Shankar <uma.shankar@intel.com>
> Cc: Louis Chauvet <louis.chauvet@bootlin.com>
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: Simon Ser <contact@emersion.fr>
> Cc: Robert Mader <robert.mader@collabora.com>
>
> Chaitanya Kumar Borah (1):
> drm/colorop: Add DRM_COLOROP_FIXED_MATRIX
>
> Harry Wentland (10):
> drm/colorop: Add limited-range YUV-to-RGB fixed matrix enum values
> drm/vkms: Add fixed matrix colorop to color pipeline
> drm/vkms: Add atomic check and matrix handling for fixed matrix
> colorop
> drm/amd/display: Add fixed matrix colorop to color pipeline
> drm/amd/display: Implement fixed matrix colorop color space mapping
> drm/amd/display: Use GAMCOR for first TF if YUV conversion is needed
> drm/amd/display: Check actual state during commit_tail
> drm/amd/display: Set color_space to plane_infos
> drm/amd/display: Set COLOR_SPACE_SRGB when fixed matrix colorop is
> bypassed
> drm/amd/display: Force GAMCOR for subsampled surfaces with
> PQ/Gamma22/HLG
>
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++-
> .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 91 +++++++++++++-
> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 27 ++++-
> .../amd/display/amdgpu_dm/amdgpu_dm_colorop.h | 1 +
> .../amd/display/modules/color/color_gamma.c | 3 +-
> drivers/gpu/drm/drm_atomic.c | 4 +
> drivers/gpu/drm/drm_atomic_uapi.c | 4 +
> drivers/gpu/drm/drm_colorop.c | 109 +++++++++++++++++
> drivers/gpu/drm/vkms/vkms_colorop.c | 66 +++++++---
> drivers/gpu/drm/vkms/vkms_composer.c | 6 +
> drivers/gpu/drm/vkms/vkms_plane.c | 68 ++++++++++-
> include/drm/drm_colorop.h | 114 ++++++++++++++++++
> include/uapi/drm/drm_mode.h | 12 ++
> 13 files changed, 487 insertions(+), 32 deletions(-)
>
> --
> 2.54.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
prev parent reply other threads:[~2026-07-09 14:33 UTC|newest]
Thread overview: 20+ 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
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
2026-07-09 14:33 ` Robert Mader [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=f5cbdbef-d76f-4ffb-983c-5bb22d40a3b2@collabora.com \
--to=robert.mader@collabora.com \
--cc=alex.hung@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chaitanya.kumar.borah@intel.com \
--cc=contact@emersion.fr \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=louis.chauvet@bootlin.com \
--cc=mwen@igalia.com \
--cc=uma.shankar@intel.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.