[PATCH v4 00/10] [PATCH v4 00/10] YUV Conversion Colorop tests

Harry Wentland <[email protected]> Fri, 31 Jul 2026 14:01:50 -0400
Newsgroups org.freedesktop.lists.igt-dev
Message-ID <[email protected]>
This kernel branch introduces a new fixed matrix colorop with
named matrices, including matrices for all YCbCr conversions
from BT.601, BT.709, and BT.2020, both limited and full range.
https://gitlab.freedesktop.org/hwentland/linux/-/tree/csc-ff-colorop

These patches add the functionality to IGT to test NV12 and
P010 buffers with the kms_colorop tests, and add corresponding
tests for the Fixed Matrix colorop to kms_colorop.

These test work on amdgpu (P010-XR30 variants) and VKMS
(NV12-XR24 variants).

The only patch that still requires review is:
  "lib/igt_color: Refactor transform_pixels for input/output FBs and CSC"

On AMD HW a couple extra driver fixes are needed. They can be
found at this kernel tree:
https://gitlab.freedesktop.org/hwentland/linux/-/tree/yuv-fm-colorop

This tree can be found at:
https://gitlab.freedesktop.org/hwentland/igt-gpu-tools/-/tree/yuv-fm-colorop

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

v4:
 - Add encoding and range to kms_colorop_fixed_matrix_t and drop the
   fixed_matrix_type_to_encoding_range function (Alex)
 - Squash "Keep CRTC active between YUV tests with temp FB" into
   previous commit (Alex)
 - Couple minor fixups to "Refactor transform_pixels" commit (Alex)

v3:
- Update to use renamed Fixed Matrix colorop. Rename related functions.

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

 include/drm-uapi/drm_mode.h |  11 +
 lib/igt_color.c             | 242 +++++++++++++++++---
 lib/igt_color.h             |   6 +-
 lib/igt_color_encoding.c    |   1 +
 lib/igt_fb.c                |  41 ++++
 lib/igt_fb.h                |   6 +
 lib/igt_kms.c               |   1 +
 lib/igt_kms.h               |   1 +
 tests/kms_colorop.c         | 428 +++++++++++++++++++++++++++++-------
 tests/kms_colorop_helper.c  |  52 +++++
 tests/kms_colorop_helper.h  |  14 +-
 11 files changed, 690 insertions(+), 113 deletions(-)

--
2.55.0