backends/drm: add support for per-drm-plane color pipelines

The drm color pipeline API provides us with a per-plane list of color operations we can program. The operations can currently be 1D lookup tables, named transfer functions, multipliers, matrices and 3D lookup tables, and which operations are available depends on the hardware and driver.

This commit adds support for 1D LUTs, multipliers and matrices. 3D LUTs are only partially supported, fully utilizing them requires a more complicated algorithm for matching our color pipelines to KMS. Named transfer functions also require some additional work to take the min/max luminances of our transfer functions into account, that will also be implemented later on.

Edit: I split 3D LUT improvements and named 1D curves into !8475. This MR is the only part required to land the kernel side

Edit 2: The result of this is that direct scanout and overlay planes work even with non-sRGB apps and non-sRGB screens. In terms of user visible impact, this means videos play more efficiently and games run a bit faster, especially when HDR, night light and color profiles are involved.

Edited by Xaver Hugl

Merge request reports

Loading