Skip to content

Add support to KMS generic color API for planes

Melissa Wen requested to merge kms_color into master

Depends on updating libdrm[1] accordingly to the ongoing KMS color proposal[2].

Example of AMD color pipeline output using KMS generic plane color management API for Overlay/Primary planes:

│       └───"COLOR_PIPELINE" (atomic): enum {Bypass, Color Pipeline 45} = Bypass
│           ├───Bypass
│           └───Color Pipeline 45
│               ├───Color Operation 45
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 1D Curve
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   └───"CURVE_1D_TYPE" (atomic): enum {sRGB EOTF, BT.2020 Inverse OETF, PQ 125 EOTF} = sRGB EOTF
│               ├───Color Operation 50
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 3x4 Matrix
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   └───"DATA" (atomic): blob = 0
│               ├───Color Operation 55
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = Multiplier
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   └───"MULTIPLIER" (atomic): range [0, UINT64_MAX] = 0
│               ├───Color Operation 60
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 1D Curve
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   └───"CURVE_1D_TYPE" (atomic): enum {sRGB Inverse EOTF, BT.2020 OETF, PQ 125 Inverse EOTF} = invalid (0)
│               ├───Color Operation 65
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 1D Curve Custom LUT
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   ├───"SIZE" (atomic): range [4096, 4096] = 4096
│               │   └───"DATA" (atomic): blob = 0
│               ├───Color Operation 71
│               │   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 1D Curve
│               │   ├───"BYPASS" (atomic): range [0, 1] = 1
│               │   └───"CURVE_1D_TYPE" (atomic): enum {sRGB EOTF, BT.2020 Inverse OETF, PQ 125 EOTF} = sRGB EOTF
│               └───Color Operation 76
│                   ├───"TYPE" (immutable): enum {1D Curve, 1D Curve Custom LUT, 3x4 Matrix, Multiplier} = 1D Curve Custom LUT
│                   ├───"BYPASS" (atomic): range [0, 1] = 1
│                   ├───"SIZE" (atomic): range [4096, 4096] = 4096
│                   └───"DATA" (atomic): blob = 0

[1] https://gitlab.freedesktop.org/mwen/drm/-/tree/kms_color

[2] https://lore.kernel.org/dri-devel/20240226211100.100108-1-harry.wentland@amd.com/

Edited by Melissa Wen

Merge request reports