Skip to content

RFC CSC Colorop with COLOR_RANGE and COLOR_ENCODING

Harry Wentland amd-gfx dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10drm/colorop: Add CSC colorop typedrivers/gpu/drm/drm_colorop.c include/uapi/drm/drm_mode.h+3 -00 replies
2/10drm/colorop: Add CSC colorop initialization helperdrivers/gpu/drm/drm_colorop.c include/drm/drm_colorop.h+128 -00 replies
3/10drm/atomic: Add CSC colorop state handlingdrivers/gpu/drm/drm_atomic.c drivers/gpu/drm/drm_atomic_uapi.c+14 -00 replies
4/10drm/vkms: Add CSC colorop supportdrivers/gpu/drm/vkms/vkms_colorop.c drivers/gpu/drm/vkms/vkms_composer.c+49 -200 replies
5/10drm/vkms: Add atomic check and matrix handling for CSC coloropdrivers/gpu/drm/vkms/vkms_plane.c+48 -20 replies
6/10drm/amd/display: Implement CSC colorop supportdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_colorop.c+98 -20 replies
7/10drm/amd/display: Use GAMCOR for first TF if CSC is useddrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c+33 -10 replies
8/10drm/amd/display: Check CSC colorop bypass before programmingdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c+6 -00 replies
9/10drm/amd/display: Check actual state during commit_taildrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+7 -50 replies
10/10drm/amd/display: Set color_space to plane_infosdrivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/10] CSC Colorop with COLOR_RANGE and COLOR_ENCODING

When we merged the drm_plane color pipeline API the major gap that existed was the lack of a color-space 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 adds a CSC colorop with the COLOR_RANGE and COLOR_ENCODING properties and implements support in VKMS and amdgpu.

An alternate way of possibly representing this has been proposed here:
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/csc-colorop

KWin branch:
https://invent.kde.org/hwentlan/kwin/-/tree/csc-3dlut

The kernel branch containing these changes, based on drm-misc-next can be found at:
https://gitlab.freedesktop.org/hwentland/linux/-/tree/csc-colorop

In order to successfully use this branch you might need a few bugfixes. The kernel tree containing those fixes plus these patches can be found at:
https://gitlab.freedesktop.org/hwentland/linux/-/tree/csc-colorop-all

Further background on this work can be found at:
https://hwentland.github.io/2026/03/10/plane-color-pipeline-csc-3d-lut-kwin.html

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]>

Harry Wentland (10):
drm/colorop: Add CSC colorop type
drm/colorop: Add CSC colorop initialization helper drm/atomic: Add CSC colorop state handling
drm/vkms: Add CSC colorop support
drm/vkms: Add atomic check and matrix handling for CSC colorop drm/amd/display: Implement CSC colorop support drm/amd/display: Use GAMCOR for first TF if CSC is used drm/amd/display: Check CSC colorop bypass before programming drm/amd/display: Check actual state during commit_tail drm/amd/display: Set color_space to plane_infos

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |  14 ++-
 .../amd/display/amdgpu_dm/amdgpu_dm_color.c   | 115 +++++++++++++++++-
 .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c |  25 +++-
 drivers/gpu/drm/drm_atomic.c                  |   6 +
 drivers/gpu/drm/drm_atomic_uapi.c             |   8 ++
 drivers/gpu/drm/drm_colorop.c                 |  91 ++++++++++++++
 drivers/gpu/drm/vkms/vkms_colorop.c           |  64 +++++++---
 drivers/gpu/drm/vkms/vkms_composer.c          |   5 +
 drivers/gpu/drm/vkms/vkms_plane.c             |  50 +++++++-
 include/drm/drm_colorop.h                     |  39 ++++++
 include/uapi/drm/drm_mode.h                   |   1 +
 11 files changed, 388 insertions(+), 30 deletions(-)

--
2.53.0