Repository navigation
drm/apple: qualify external SDR color and monitor EDID on J700 - #280
Closed
RyanTheTide wants to merge 10 commits into
Closed
RyanTheTide wants to merge 10 commits into
RyanTheTide wants to merge 10 commits into
Conversation
Choose advertised full-range 8/10-bit SDR RGB modes for the experimental external H17P profile. Prefer sRGB or BT.709 over default RGB, then use firmware scores. Reject timings that only offer incompatible color modes instead of selecting BT.2020 for native SDR scanout. Leave internal and legacy policy unchanged. The working J700 selected BT.2020 RGB while displaying an SDR desktop. Production-parser tests cover 65 valid, malformed, legacy and high-refresh cases. Hardware color appearance still requires qualification. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…alls Use the external DPAV endpoint's inline framing with independent request length and response capacity. Validate actual service and EDID lengths before reading them, retain timeout ownership, and queue a connector reprobe when the service appears late. Preserve the legacy padded OOB path and EDID reader, and keep internal H17P excluded. Host tests exercise the production sender, service envelope, EDID reader, ring admission and late notification with malformed replies and timeout cases. Hardware identity and color qualification remain pending. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Expose AFK headers before protocol decoding, submitted surface metadata, CTM values, and A423/A428 reply values through disabled-by-default tracepoints. Capture at most 32 received header bytes and do not dereference firmware-advertised addresses. Preserve all firmware requests and callback results. Host tests exercise the actual trace assignments and callback continuation with zero/short/null and unaligned inputs. These observers support investigating the unqualified DPAV announcement and output-color behavior without changing protocol policy. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Treat the transport/interface/reserved header fields as opaque, matching captured firmware responses and the owned-DMA validator, while retaining identity, type, tag, category and payload-bound checks. Add an optional read-only ring snapshot at the DPAV announcement timeout; it does not consume data or send another command. Host tests preserve response mismatch rejection, short-reply checks and timeout ownership, and verify the snapshot's enable, readiness, stop and pointer guards. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Exclude firmware-listed unsafe and DSC-required color IDs before choosing an external H17P SDR candidate. Read restrictions independently of property order and reject malformed or duplicate lists instead of silently treating them as empty. Preserve internal and legacy parsing. The captured dock route permits 60 Hz at 10-bit and 120 Hz at 8-bit; its 144/180 Hz timings have no eligible nonvirtual SDR candidate after exclusions. This is metadata admission, not a new physical-link qualification or a global refresh cap. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…hment Expose the firmware-reported identity, primaries and preferred timing while raw DPAV EDID is unavailable on the experimental H17P external path. Keep this synthetic base block out of the raw cache, require complete metadata from the same initial connection, and invalidate it on route or cable loss. Do not synthesize extra timings, audio, HDR, VRR or link capabilities. Serialize EDID property and cache changes with connector probing. Defer commit-context disconnect cleanup through a persistent invalidation flag, so rapid reconnection cannot lose it or invert DRM modeset lock ordering. Include bounded-parser, independent EDID decoding and concurrent lifetime tests. Hardware qualification remains pending. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Record bounded connection tickets and validity flags while holding the metadata lock. Trace initial association, property receipt and probing to distinguish an ineligible connection from incomplete or rejected metadata without logging monitor contents or weakening admission. The tracepoint is disabled by default. Exercise the observation path in the existing metadata lifetime test. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
H17P advertises one extra byte after the word-aligned serialized property, but does not send that byte. Requiring received == advertised discarded complete same-connection TimingElements and DisplayAttributes. Validate the complete serialized object against bytes actually received. Accept exact lengths or the observed one-byte framing convention only; reject gaps, excess trailing content and truncated values. Perform the bounded structural walk outside the metadata spinlock, then retain the existing connection-ticket checks. No absent byte is used as payload. Exercise captured property extents, truncation mutations and a missing final string byte alongside metadata lifetime and decoder tests. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The frame test measures GTK/compositor feedback, which cannot prove the monitor is showing the selected input or new scanout. Record the actual GDK surface output and state the measurement scope explicitly. Add a bounded manual grayscale comparison pattern to measure the output midtone response without changing monitor settings or kernel controls. Retain the existing moving pattern and feedback fields. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Track placement in frame ticks, since the first static draw can precede fullscreen mapping. Retry drawing while placement differs from the requested output. Generated-by: LLM Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
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.
J700 external output selected BT.2020 for an SDR desktop, exposed timing/colour combinations the firmware marks unsafe, and reported an unknown monitor when DPAV did not announce its service. Prefer advertised sRGB/full-range modes, enforce per-timing restrictions, and restore bounded DPAV EDID handling.
When raw EDID is unavailable, expose a clearly marked firmware-derived base block containing the reported identity, primaries, gamma and validated preferred timing. Require complete data from the same initial connection; never use the derived block as a raw EDID cache entry or synthesize extra timings, audio, HDR, VRR or link capabilities. Route/cable loss invalidates this fallback. Serialize property/cache updates and defer commit-context cleanup through a persistent invalidation flag.
H17P advertises one byte after the aligned serialized object without sending it. Validate the entire object against delivered bytes, accepting only exact lengths or that observed framing convention. Reject missing values, transfer gaps and trailing objects. Perform the structural walk outside the metadata spinlock. Disabled tracepoints expose bounded wire and admission-state diagnostics without monitor contents.
Based on #278's working output path. Shutdown/reconnect qualification remains separate in #279. Independently authored public code uses owner-authorized audited hardware/protocol facts; no private implementation or firmware copied.
Validation:
The public output diagnostic at 363fb57 checks actual connector placement and explicitly separates compositor feedback from physical scanout. It adds a bounded, attended grey/checkerboard comparison; no automated colour-accuracy claim is made.
Draft limits: owner reports badly washed-out/pastel colour on the external Acer only, including with monitor HDR Off. Colour qualification has failed and root cause remains under investigation. A reported detached/frozen reconnect and absent animation were confounded by the monitor selecting another computer; those physical-failure claims are withdrawn. Software reconnect passed, but correct-input physical reconnect remains unverified and monitor identity/profile loss after reconnect is confirmed. Raw DPAV service announcement remains absent; R33's initialized RX/TX rings were empty at timeout. Derived metadata is limited to the initial connection. Physical reconnect, DPMS, suspend and release qualification remain open. An earlier 180 Hz software presentation run is not a qualification: every 180 Hz colour candidate is marked unsafe on the current dock route. No release tag or merge is justified yet.
Colour follow-up: the generated profile has gamma 2.2 on every channel and no VCGT ramp. Current installed Mutter 51 uses default colour mode 0 on both outputs; matching upstream source selects sRGB/GAMMA22 for that mode. These checks do not establish physical colour accuracy or a driver fix. Attended gamma comparison remains pending.