[PATCH V10 03/30] drm-uapi: Add COLOROP object
Aurabindo Pillai
aurabindo.pillai at amd.com
Tue Aug 26 16:37:10 UTC 2025
On 8/15/25 12:06 AM, Alex Hung wrote:
> From: Harry Wentland <harry.wentland at amd.com>
>
> DRM is introducing a new DRM core obejct, a drm_colorop. This
> object will represent one color operation in a color pipeline.
>
> Introduce the object type in the drm-uapi, including the
> following types:
> - DRM_COLOROP_1D_CURVE,
> - DRM_COLOROP_1D_LUT,
> - DRM_COLOROP_CTM_3X4,
>
> Signed-off-by: Alex Hung <alex.hung at amd.com>
> Signed-off-by: Harry Wentland <harry.wentland at amd.com>
> ---
> include/drm-uapi/amdgpu_drm.h | 9 --
> include/drm-uapi/drm_mode.h | 23 +++
> lib/igt_kms.c | 272 +++++++++++++++++++++++++++++++++-
> lib/igt_kms.h | 89 +++++++++++
> tests/kms_properties.c | 3 +
> 5 files changed, 381 insertions(+), 15 deletions(-)
>
> diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h
> index b38f27d69..ca24519c7 100644
> --- a/include/drm-uapi/amdgpu_drm.h
> +++ b/include/drm-uapi/amdgpu_drm.h
> @@ -1590,15 +1590,6 @@ struct drm_amdgpu_info_uq_metadata {
> #define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
> #define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
>
> -/* FIXME wrong namespace! */
> -struct drm_color_ctm_3x4 {
> - /*
> - * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
> - * (not two's complement!) format.
> - */
> - __u64 matrix[12];
> -};
> -
> #if defined(__cplusplus)
> }
> #endif
> diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h
> index c082810c0..fce45b5cf 100644
> --- a/include/drm-uapi/drm_mode.h
> +++ b/include/drm-uapi/drm_mode.h
> @@ -629,6 +629,7 @@ struct drm_mode_connector_set_property {
> #define DRM_MODE_OBJECT_FB 0xfbfbfbfb
> #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
> #define DRM_MODE_OBJECT_PLANE 0xeeeeeeee
> +#define DRM_MODE_OBJECT_COLOROP 0xfafafafa
> #define DRM_MODE_OBJECT_ANY 0
>
> struct drm_mode_obj_get_properties {
> @@ -846,6 +847,22 @@ struct drm_color_ctm {
> __u64 matrix[9];
> };
>
> +struct drm_color_ctm_3x4 {
> + /*
> + * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
> + * (not two's complement!) format.
> + *
> + * TODO what's the format?
The format seems to be mentioned right above this line, so perhaps this
is a stale TODO ?
> + *
> + * out matrix in
> + * |R| |0 1 2 3 | | R |
> + * |G| = |4 5 6 7 | x | G |
> + * |B| |8 9 10 12| | B |
Typo 11 instead of 12 ?
More information about the igt-dev
mailing list