Skip to content

YUV Conversion Colorop tests

Harry Wentland igt-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 1 replyIn review
  2. v312 patches 14 repliesSuperseded
  3. v2 RFC11 patches 0 repliesSuperseded

Changes in v4 from the cover letter

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

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10include/drm-uapi: Add DRM_COLOROP_FIXED_MATRIXinclude/drm-uapi/drm_mode.h+11 -00 replies
2/10lib/igt_kms: Add IGT_COLOROP_FIXED_MATRIX propertylib/igt_kms.c lib/igt_kms.h+2 -00 replies
3/10tests/kms_colorop_helper: Add Fixed Matrix colorop infrastructuretests/kms_colorop_helper.c tests/kms_colorop_helper.h+65 -10 replies
4/10lib/igt_fb: Add YUV color pattern framebuffer supportlib/igt_fb.c lib/igt_fb.h+47 -00 replies
5/10lib/igt_color_encoding: Add XRGB2101010 format supportlib/igt_color_encoding.c+1 -00 replies
6/10lib/igt_color: Add YUV pixel reading supportlib/igt_color.c+72 -00 replies
7/10lib/igt_color: Refactor transform_pixels for input/output FBs and CSClib/igt_color.c lib/igt_color.h tests/kms_colorop.c+160 -501 reply
8/10tests/kms_colorop: Add FIXED_MATRIX colorop teststests/kms_colorop.c+218 -510 replies
9/10tests/kms_colorop: Add bypass transition teststests/kms_colorop.c+115 -120 replies
10/10tests/kms_colorop: Increase VKMS bracket to 3 uptests/kms_colorop.c+1 -10 replies

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchAlex HungLouis Chauvet
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

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

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