evdi: harden software colour path and color_props advertisement - #2
Merged
iDoMeteor merged 2 commits intoAug 15, 2026
Merged
Conversation
Apply only compositor GAMMA_LUT/CTM blobs (no gamma↔CTM synthesis). Which properties the CRTC advertises is selected at module load with color_props=both|gamma|ctm so Mutter can be steered like apple-drm (CTM-only) or gamma-only; reload the module to change it. Skip identity transforms, fuse diagonal CTMs into a 256-entry LUT for a cheap hot path, reuse a per-device GRABPIX scratch row, and full-dirty only when the effective apply payload changes so static Night Light updates still re-grab without spamming USB on no-op churn. Add a read-only color_status parameter for per-card apply path and scale dumps.
onetr1ck
force-pushed
the
wip/color-mgmt-followups
branch
from
August 14, 2026 21:04
e7a872c to
56df938
Compare
Diagonal CTM fuse overwrote a compositor gamma LUT when both were set; compose CTM-then-gamma into the table instead. Shared GRABPIX scratch could be freed under concurrent grab — use a per-call buffer. DisplayLinkManager enables cursor events, so the SW tint path never ran and the pointer stayed day-white under Night Light. While colour is active, hide the HW cursor event and SW-blend with the same transform, re-advertising on colour change so DLM does not double-draw.
Author
|
Pushed another commit: fuse composes with an existing gamma LUT, GRABPIX uses a per-call scratch, and while colour is active we SW-blend the cursor and hide the HW cursor event so DisplayLinkManager does not leave it untinted. For DisplayLink DisplayLink#584, worth linking DisplayLink#44 (gamma ramp, open since 2016) if you have not already — that looks like the long-standing issue this closes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on your colour management branch (after the earlier damage/cursor/color_props work).
This keeps applying only real compositor GAMMA_LUT and CTM blobs, with no gamma↔CTM synthesis. color_props=both|gamma|ctm at module load chooses which DRM properties the CRTC advertises so Mutter can be steered like apple-drm (CTM only) or gamma only; reload the module to change it.
Identity transforms are skipped, diagonal CTMs fuse into a 256-entry LUT (composing with an existing gamma when both are set), GRABPIX uses a per-call scratch row, and full-dirty runs only when the effective apply payload changes. While colour is active, the software cursor path is forced so DisplayLinkManager cursor events do not leave an untinted pointer. color_status dumps the per-card apply path.
Tested on a DisplayLink dock with GNOME Night Light (color_props=ctm). Happy for you to take any of this into the upstream PR or leave it. DisplayLink#44 is still the long-standing gamma ramp request if you want a Closes link on DisplayLink#584.