Summary: | Night Light broken on ARM devices (Missing Color Transform Matrix support) | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Leonard Lausen <leonard> |
Component: | platform-drm | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | leonard, m.kurz, nate, xaver.hugl |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/114032d2ac4d2eb9433bf75c0e6a82ecce7fa558 | Version Fixed In: | 5.27.3 |
Sentry Crash Report: |
Description
Leonard Lausen
2022-06-21 13:39:01 UTC
GAMMA_LUT is not legacy at all, CTM is supposed to be used in combination with gamma and degamma, not instead of it. That's at least the state with upstream drivers and desktop GPUs: the color pipeline is degamma -> ctm -> gamma. Support for using the CTM without gamma and degamma can be added though - I just need to figure out how to generate the needed color transformation matrix... ChromiumOS hardcodes a single CTM for "night color enabled", which is not very useful for us - we have brightness, ICC profile, night mode and soon gamma adjustment that all need to play together. Afaiu the 3x3 CTM that drm provides is also a lot less accurate than the LUTs, so that may complicate things as well - we might need to quantify that error and fall back to a shader based solution instead where needed. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3296 A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3771 Git commit f2417a85233e1b7c1c68039230c45554f1069694 by Xaver Hugl. Committed on 07/03/2023 at 16:03. Pushed by vladz into branch 'master'. backends/drm: support CTM for simple color transformations In order to work around hardware and drivers that aren't capable of applying a LUT, calculate a per-channel factor for brightness and color temperature modification. While this ignores color calibration, this makes night color work until a proper shader based color pipeline is implemented. M +1 -1 src/backends/drm/drm_crtc.cpp M +1 -0 src/backends/drm/drm_crtc.h M +17 -2 src/backends/drm/drm_output.cpp M +2 -1 src/backends/drm/drm_output.h M +52 -2 src/backends/drm/drm_pipeline.cpp M +16 -1 src/backends/drm/drm_pipeline.h M +3 -2 src/backends/x11/standalone/x11_standalone_output.cpp M +1 -1 src/backends/x11/standalone/x11_standalone_output.h M +15 -6 src/colors/colordevice.cpp M +7 -1 src/core/output.cpp M +3 -1 src/core/output.h https://invent.kde.org/plasma/kwin/commit/f2417a85233e1b7c1c68039230c45554f1069694 Git commit 114032d2ac4d2eb9433bf75c0e6a82ecce7fa558 by Vlad Zahorodnii, on behalf of Xaver Hugl. Committed on 08/03/2023 at 19:09. Pushed by vladz into branch 'Plasma/5.27'. backends/drm: support CTM for simple color transformations In order to work around hardware and drivers that aren't capable of applying a LUT, calculate a per-channel factor for brightness and color temperature modification. While this ignores color calibration, this makes night color work until a proper shader based color pipeline is implemented. (cherry picked from commit f2417a85233e1b7c1c68039230c45554f1069694) M +1 -1 src/backends/drm/drm_crtc.cpp M +1 -0 src/backends/drm/drm_crtc.h M +17 -2 src/backends/drm/drm_output.cpp M +2 -1 src/backends/drm/drm_output.h M +52 -2 src/backends/drm/drm_pipeline.cpp M +16 -1 src/backends/drm/drm_pipeline.h M +3 -2 src/backends/x11/standalone/x11_standalone_output.cpp M +1 -1 src/backends/x11/standalone/x11_standalone_output.h M +15 -6 src/colors/colordevice.cpp M +7 -1 src/core/output.cpp M +3 -1 src/core/output.h https://invent.kde.org/plasma/kwin/commit/114032d2ac4d2eb9433bf75c0e6a82ecce7fa558 |