Hi Harry,

thanks a lot for the series. I have a experimental Weston MR which tests the new color-op with VKMS at [1] - both as pure replacement for the legacy properties as well as in combination with a complete color-pipelines for pre- and post-blending (using a kernel branch [2] based on Melissas branch [3] for AMD post-blending). From all I tried it seems to work great - the API is works beautifully and the test checks for visual compatibility with the legacy properties, the Weston internal shaders as well as Mesas shaders. In conclusion I'd love to see the series land (soon).

Best regards,

Robert


1: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/2157

2: https://gitlab.com/rmader/linux/-/commits/gamescope_pipeline_w_colorop-2026-07-28

3: https://gitlab.freedesktop.org/mwen/drm-misc/-/commits/gamescope_pipeline_w_colorop

On 22.07.26 15:45, 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

v4:
  - Specify matrix entries in docs (Pekka)
  - Squash limited-range enums into "Add FM" patch (Robert)
  - Don't reject RGB planes with fixed matrix in VKMS as
    we don't want or need to make a colorop dependent on
    the framebuffer's pixel format. (Robert)
  - Fix conversion matrices in VKMS and implement kunit
    tests (discovered while documenting the matrices)

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 <[email protected]>
Cc: Daniel Stone <[email protected]>
Cc: Chaitanya Kumar Borah <[email protected]>
Cc: Uma Shankar <[email protected]>
Cc: Louis Chauvet <[email protected]>
Cc: Melissa Wen <[email protected]>
Cc: Simon Ser <[email protected]>
Cc: Robert Mader <[email protected]>

Chaitanya Kumar Borah (1):
   drm/colorop: Add DRM_COLOROP_FIXED_MATRIX

Harry Wentland (10):
   drm/vkms: Fix limited-range YCbCr to RGB conversion scaling
   drm/vkms: Add KUnit test for YCbCr to RGB conversion matrices
   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: 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   |  85 +++++++++-
  .../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             |   7 +
  drivers/gpu/drm/drm_colorop.c                 | 109 ++++++++++++
  drivers/gpu/drm/vkms/tests/vkms_format_test.c | 160 +++++++++++++++---
  drivers/gpu/drm/vkms/vkms_colorop.c           |  66 +++++---
  drivers/gpu/drm/vkms/vkms_composer.c          |   6 +
  drivers/gpu/drm/vkms/vkms_formats.c           |  64 +++++--
  drivers/gpu/drm/vkms/vkms_formats.h           |   2 +-
  drivers/gpu/drm/vkms/vkms_plane.c             |  55 +++++-
  include/drm/drm_colorop.h                     | 159 +++++++++++++++++
  include/uapi/drm/drm_mode.h                   |  12 ++
  16 files changed, 706 insertions(+), 68 deletions(-)

--
2.55.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

Reply via email to