From: Alex Hung <alex.hung@amd.com>
To: Harry Wentland <harry.wentland@amd.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH v3 03/12] tests/kms_colorop_helper: Add Fixed Matrix colorop infrastructure
Date: Sat, 25 Jul 2026 00:56:40 -0600 [thread overview]
Message-ID: <e1e8a069-cd96-4c0b-9e57-15f2f20042ef@amd.com> (raw)
In-Reply-To: <20260623175737.171142-4-harry.wentland@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 6/23/26 11:57, Harry Wentland wrote:
> Add support for Fixed Matrix colorops:
> - Add KMS_COLOROP_FIXED_MATRIX type to the test colorop type enum
> - Add kms_colorop_fixed_matrix_info_t struct carrying the DRM enum string
> name plus encoding/range for software reference transforms
> - Add can_use_colorop() handling: matches DRM_COLOROP_FIXED_MATRIX type and
> verifies the specific FIXED_MATRIX enum value is supported
> - Add set_colorop() handling: sets FIXED_MATRIX via single enum property
> - Define four FIXED_MATRIX colorop instances: BT.709 limited/full, BT.601
> limited, and BT.2020 limited
>
> Assisted-by: Claude:claude-opus-4-6
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> ---
> tests/kms_colorop_helper.c | 45 ++++++++++++++++++++++++++++++++++++++
> tests/kms_colorop_helper.h | 12 +++++++++-
> 2 files changed, 56 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_colorop_helper.c b/tests/kms_colorop_helper.c
> index aaee4e567ef6..d12584c9adb1 100644
> --- a/tests/kms_colorop_helper.c
> +++ b/tests/kms_colorop_helper.c
> @@ -200,6 +200,42 @@ kms_colorop_t kms_colorop_3dlut_17_12_rgb = {
> .transform = &igt_color_3dlut_17_12_rgb,
> };
>
> +kms_colorop_t kms_colorop_bt709_limited_ycbcr_to_rgb = {
> + .type = KMS_COLOROP_FIXED_MATRIX,
> + .fixed_matrix_info = {
> + .fixed_matrix_type_name = "YCbCr 709 Limited to RGB",
> + },
> + .name = "YCbCr BT.709 Limited Range to RGB",
> + .transform = NULL,
> +};
> +
> +kms_colorop_t kms_colorop_bt709_full_ycbcr_to_rgb = {
> + .type = KMS_COLOROP_FIXED_MATRIX,
> + .fixed_matrix_info = {
> + .fixed_matrix_type_name = "YCbCr 709 Full to RGB",
> + },
> + .name = "YCbCr BT.709 Full Range to RGB",
> + .transform = NULL,
> +};
> +
> +kms_colorop_t kms_colorop_bt601_limited_ycbcr_to_rgb = {
> + .type = KMS_COLOROP_FIXED_MATRIX,
> + .fixed_matrix_info = {
> + .fixed_matrix_type_name = "YCbCr 601 Limited to RGB",
> + },
> + .name = "YCbCr BT.601 Limited Range to RGB",
> + .transform = NULL,
> +};
> +
> +kms_colorop_t kms_colorop_bt2020_limited_ycbcr_to_rgb = {
> + .type = KMS_COLOROP_FIXED_MATRIX,
> + .fixed_matrix_info = {
> + .fixed_matrix_type_name = "YCbCr 2020 Limited to RGB NC",
> + },
> + .name = "YCbCr BT.2020 Limited Range to RGB",
> + .transform = NULL,
> +};
> +
> static bool can_use_colorop(igt_display_t *display, igt_colorop_t *colorop, kms_colorop_t *desired)
> {
> switch (desired->type) {
> @@ -218,6 +254,11 @@ static bool can_use_colorop(igt_display_t *display, igt_colorop_t *colorop, kms_
> return (igt_colorop_get_prop(display, colorop, IGT_COLOROP_TYPE) == DRM_COLOROP_MULTIPLIER);
> case KMS_COLOROP_LUT3D:
> return (igt_colorop_get_prop(display, colorop, IGT_COLOROP_TYPE) == DRM_COLOROP_3D_LUT);
> + case KMS_COLOROP_FIXED_MATRIX:
> + if (igt_colorop_get_prop(display, colorop, IGT_COLOROP_TYPE) == DRM_COLOROP_FIXED_MATRIX &&
> + igt_colorop_try_prop_enum(colorop, IGT_COLOROP_FIXED_MATRIX, desired->fixed_matrix_info.fixed_matrix_type_name))
> + return true;
> + return false;
> default:
> return false;
> }
> @@ -362,6 +403,10 @@ static void set_colorop(igt_display_t *display, kms_colorop_t *colorop)
>
> configure_3dlut(display, colorop, lut_size);
> break;
> + case KMS_COLOROP_FIXED_MATRIX:
> + igt_colorop_set_prop_enum(colorop->colorop, IGT_COLOROP_FIXED_MATRIX,
> + colorop->fixed_matrix_info.fixed_matrix_type_name);
> + break;
> default:
> igt_fail(IGT_EXIT_FAILURE);
> }
> diff --git a/tests/kms_colorop_helper.h b/tests/kms_colorop_helper.h
> index a081fa02db8e..68ae1dd05c6f 100644
> --- a/tests/kms_colorop_helper.h
> +++ b/tests/kms_colorop_helper.h
> @@ -22,7 +22,8 @@ typedef enum kms_colorop_type {
> KMS_COLOROP_CUSTOM_LUT1D,
> KMS_COLOROP_CTM_3X4,
> KMS_COLOROP_MULTIPLIER,
> - KMS_COLOROP_LUT3D
> + KMS_COLOROP_LUT3D,
> + KMS_COLOROP_FIXED_MATRIX,
> } kms_colorop_type_t;
>
> typedef enum kms_colorop_lut1d_tf {
> @@ -50,8 +51,13 @@ typedef struct kms_colorop_lut3d_info {
> enum drm_colorop_lut3d_interpolation_type interpolation;
> } kms_colorop_lut3d_info_t;
>
> +typedef struct kms_colorop_fixed_matrix_info {
> + const char *fixed_matrix_type_name;
> +} kms_colorop_fixed_matrix_info_t;
> +
> typedef struct kms_colorop {
> kms_colorop_type_t type;
> + kms_colorop_fixed_matrix_info_t fixed_matrix_info;
>
> union {
> kms_colorop_enumerated_lut1d_info_t enumerated_lut1d_info;
> @@ -94,6 +100,10 @@ extern kms_colorop_t kms_colorop_ctm_3x4_bt709_dec;
> extern kms_colorop_t kms_colorop_multiply_125;
> extern kms_colorop_t kms_colorop_multiply_inv_125;
> extern kms_colorop_t kms_colorop_3dlut_17_12_rgb;
> +extern kms_colorop_t kms_colorop_bt709_limited_ycbcr_to_rgb;
> +extern kms_colorop_t kms_colorop_bt709_full_ycbcr_to_rgb;
> +extern kms_colorop_t kms_colorop_bt601_limited_ycbcr_to_rgb;
> +extern kms_colorop_t kms_colorop_bt2020_limited_ycbcr_to_rgb;
>
> igt_colorop_t *get_color_pipeline(igt_display_t *display,
> igt_plane_t *plane,
next prev parent reply other threads:[~2026-07-25 6:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 17:57 [PATCH v3 00/12] YUV Conversion Colorop tests Harry Wentland
2026-06-23 17:57 ` [PATCH v3 01/12] include/drm-uapi: Add DRM_COLOROP_FIXED_MATRIX Harry Wentland
2026-07-25 6:52 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 02/12] lib/igt_kms: Add IGT_COLOROP_FIXED_MATRIX property Harry Wentland
2026-07-25 6:56 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 03/12] tests/kms_colorop_helper: Add Fixed Matrix colorop infrastructure Harry Wentland
2026-07-25 6:56 ` Alex Hung [this message]
2026-06-23 17:57 ` [PATCH v3 04/12] tests/kms_colorop_helper: Add helpers to get encoding/range from FIXED_MATRIX name Harry Wentland
2026-07-25 7:04 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 05/12] lib/igt_fb: Add YUV color pattern framebuffer support Harry Wentland
2026-07-25 7:05 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 06/12] lib/igt_color_encoding: Add XRGB2101010 format support Harry Wentland
2026-07-25 7:05 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 07/12] lib/igt_color: Add YUV pixel reading support Harry Wentland
2026-07-25 7:10 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 08/12] lib/igt_color: Refactor transform_pixels for input/output FBs and CSC Harry Wentland
2026-06-23 17:57 ` [PATCH v3 09/12] tests/kms_colorop: Add FIXED_MATRIX colorop tests Harry Wentland
2026-07-25 7:15 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 10/12] tests/kms_colorop: Keep CRTC active between YUV tests with temp FB Harry Wentland
2026-07-25 7:19 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 11/12] tests/kms_colorop: Add bypass transition tests Harry Wentland
2026-07-25 7:25 ` Alex Hung
2026-06-23 17:57 ` [PATCH v3 12/12] tests/kms_colorop: Increase VKMS bracket to 3 up Harry Wentland
2026-07-25 7:24 ` Alex Hung
2026-06-23 18:55 ` ✓ Xe.CI.BAT: success for YUV Conversion Colorop tests (rev2) Patchwork
2026-06-23 19:19 ` ✓ i915.CI.BAT: " Patchwork
2026-06-24 1:27 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-24 5:44 ` ✗ i915.CI.Full: " Patchwork
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=e1e8a069-cd96-4c0b-9e57-15f2f20042ef@amd.com \
--to=alex.hung@amd.com \
--cc=harry.wentland@amd.com \
--cc=igt-dev@lists.freedesktop.org \
/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.