backends/drm: make night light correct with ICC profiles as well
We can't apply night light before the ICC profile with r, g, b channel factors because that ignores whitepoint adaptation. We also can't apply it after the ICC profile tag is applied though, because at that point the colorspace is not linear anymore - neither in brightness, nor with the primaries.
Instead, this implements absolute colorimetric transforms for ICC profiles by adding the required transformations in front of the BToA1 tag. The transformation then goes display color space -> XYZ D50 -> BToA1 tag which results in the display color space again, and absolute colorimetric transforms to the display color space can be applied before that. With that absolute colorimetric transform, the white point is now just changed by the renderer and the ICC shader keeps that change in place.
(cherry picked from commit 1f832cfc)
Co-authored-by: Xaver Hugl xaver.hugl@gmail.com