Draft: backends/drm: add support for drm color operations
This allows us to offload color operations to KMS, so we could get a complete zero-copy path for example for HDR video -> screen, with tone mapping applied. There are some visual differences when tone mapping gets applied on AMD right now, but this is IMO good enough to merge, and that can be optimized later (be it by optimizing the 3D LUT, or changing the shader to match the KMS hardware).
See the commits for details. Most of the drm color pipeline maps well to our existing code already, but the third commit optimizes it a lot for 3D LUTs.
This can be tested with https://gitlab.freedesktop.org/hwentland/linux/-/tree/amd-color-pipeline-v6, and there's also a branch for Intel in the same repository (which I haven't tested yet though)
Edited by Xaver Hugl