One of the Linux Direct Rendering Manager (DRM) patch series that has long been in the works is on a standardized Color Pipeline API. This is for improving advanced color management handling on Linux and aligns with what Valve and Igalia engineers have been doing with AMD-specific color management implementation on the Steam Deck and their Gamescope compositor. Sent out today by AMD was the 11th iteration of these Color Pipeline API patches.
Out today is the v11 patch series of this Linux Color Pipeline API and is implemented both for the AMDGPU kernel graphics driver and the generic Virtual KMS (VKMS) driver. Intel has separately been working on patches for their driver that would be compatible with this API.
The updated patch series changes around the naming convention for some LUT code but otherwise appears to be stabilizing. As for the overall state:
Amdgpu advertises the following pipeline for GPUs with DCN 3 or newer:
1. 1D Curve EOTF
2. 3×4 CTM
3. Multiplier
4. 1D Curve Inverse EOTF
5. 1D LUT
6. 3D LUT
7. 1D Curve EOTF
8. 1D LUTThe supported curves for the 1D Curve type are:
– sRGB EOTF and its inverse
– PQ EOTF, scaled to [0.0, 125.0] and its inverse
– BT.2020/BT.709 OETF and its inverse
…
At this point we’re hoping to see gamescope, kwin and weston implementations take shape. The existing pipeline should be enough to satisfy the gamescope use-cases on the drm_plane.
There are also other features that are on the minds of the developers working on this code, but it’s possible they could be added after this initial Color Pipeline API code is upstreamed into the Linux kernel. More details on this Color Pipeline API work via this v11 patch series from AMD engineer Alex Hung.
For more background information on this effort from the perspective of the Steam Deck, see this XDC 2023 presentation by Igalia engineer Melissa Wen.