Repository navigation
drm/apple: enable HDR10 on legacy DisplayPort AV services - #2965
RyanTheTide wants to merge 2 commits into
Conversation
Select safe PQ colour elements on the IOMFB backends that program catalogue colour IDs and tag PQ surfaces. A PQ colour element that needs DSC can be used when the backend delegates compression to DCP. Prefer RGB at the same PQ output quality and favour uncompressed entries when the format and depth are otherwise equal. Track static metadata against the announced AV service and the current link. Reuse the existing Type 1 encoder for legacy DisplayPort, update it without a modeset, and clear the InfoFrame before returning to SDR. Drop results that arrive after the link or service was reset. A J413 drove an MSI display at 2560x1440 and 280 Hz using 10-bit RGB PQ with DSC 1.2. The monitor OSD reported HDR. A metadata-only update and the return to SDR both completed on the default kernel command line. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Wait for the current Type-C route before sending HDR metadata and forget link metadata after power-off on every IOMFB backend. Pair service publication with the lockless reader and accept the legacy DP-to-HDMI AV service alongside its DisplayPort counterparts. Only deduplicate a command after a valid reply. A transport failure or truncated reply leaves the active block uncertain, even when a previous block was sent successfully. An explicit firmware refusal is still deduplicated on the same link. Validate both Type 1 metadata fields and the blob length before the connector takes the metadata-only commit path. Extend the host fixtures for AV service ownership, stale replies and metadata retransmission. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
RyanTheTide
left a comment
There was a problem hiding this comment.
Review at 5f2bfa1. The 280 Hz J413 row establishes PQ/DSC entry and return to SDR, and the parser fixtures cover the ranking change. Keep the PR draft pending the AV-service lifetime and route corrections. In particular, dcp_hdr_service_bind() resets the sent state but schedules no metadata update when a legacy service announces after the last flip. A static desktop may already have entered PQ and will send no user metadata until a subsequent commit. Please exercise late announcement, without forcing a flip or a changed blob before the assertion. Also test the identical HDR blob after DPMS and the already-supported desktop path.
RyanTheTide
left a comment
There was a problem hiding this comment.
Re-review at 782fc44. The new head checks route readiness before the link update, validates the Type 1 metadata before the live-update fast path, adds the native HDMI legacy binding and invalidates state after power-off. The reply change correctly keeps transport failures and malformed replies out of the duplicate cache. The local 93-case suite and arm64 object builds cover the source changes.
The service-announcement finding remains open: bind invalidates the cache but schedules no update if the desktop has already stopped flipping. Please cover that idle scanout case and a STOP failure before SDR. The identical-blob DPMS and cross-template hardware rows are still open. Keep #2951 coordinated with the point where the selected backend publishes PQ support, before connector properties are registered.
Problem
Stock fleet85 rejects an HDR atomic commit on the J413 even when its timing catalogue contains a safe 10-bit RGB BT.2020 PQ element. At 2560×1440 and 280 Hz, that element requires DSC.
Change
Allow the IOMFB template to select safe PQ entries that use DSC. Reuse the HDR10 static metadata encoder on the announced legacy AV service. Send metadata after the route is ready, validate blobs before accepting metadata-only commits, and clear the cached block after power-off or an incomplete reply.
Testing
On the earlier candidate (
5f2bfa17e7ef), the MSI MPG 325CQRXF OSD reported HDR over J413 USB-C at 2560×1440 and 280 Hz. On the production command line, the DCP selected 10-bit RGB BT.2020 PQ with DSC 1.2. It acknowledged a live MaxCLL change from 1000 to 900 and cleared the InfoFrame on the return to SDR. Stock fleet85 was restored and verified.The current head (
782fc44bfec4) passes all 93 Apple DCP host cases and builds the four changed arm64 driver objects withW=1. The fleet85 display module links and signs. Hosted Apple DRM KUnit and Host tests both pass.Still to run
Repeat J413 HDR after DPMS off/on and after a switch to SDR, reusing the same metadata blob. Run the cross-machine PQ and SDR regressions for the other template backends and desktop metadata path.
Review details and measurements
010010000The initial SDR control measured 292.40 Hz in DRM event timestamps while the sink reported 280 Hz. The two closing 280 Hz rows agreed with the sink. SELinux stayed Enforcing with zero AVCs. Production verification found zero failed units.
The new host cases cover legacy DP and DP-to-HDMI service ownership, retry after a transport error or a short reply, and a reply arriving after the link generation changed. The metadata cache also retries the previous block if an intervening update has an uncertain result. The same fixture fails on the earlier head when a transport error marks the block as sent.
Earlier IOMFB PQ work · Connector capability work
Assisted-by: LLM (Codex)