Repository navigation
drm/apple: forward HDMI converter requests on every native HDMI port; admit PQ by the IOMFB template - #2389
Draft
RyanTheTide wants to merge 3 commits into
Draft
drm/apple: forward HDMI converter requests on every native HDMI port; admit PQ by the IOMFB template#2389RyanTheTide wants to merge 3 commits into
RyanTheTide wants to merge 3 commits into
Conversation
…MI port dcp_hdmi_init() set up the forwarding of the DP-to-HDMI converter's IRQ_HPD service requests (short HPD pulses, and a poll after an HBR3 link configuration while the converter trains an FRL link) only on apple,t6030-dcpext. The request is DisplayPort protocol, and every board with a native HDMI port has the same arrangement: an external display coprocessor whose DPTX port drives an on-board DP-to-HDMI converter, with the hdmi-hpd GPIO in its DT node. Key it on what the hardware has: a fixed HDMI-A connector and an HDMI HPD GPIO. A firmware that does not take the sink IRQ call answers it with an error, which already stops the polling and is logged rate limited. Fixes: 0960c7e ("drm/apple: forward HDMI converter service requests on t6030") Suggested-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…rmwares dcp_hdr_output_supported() let a PQ commit through on the desktop 26.x firmware, the H17P external method profile and firmware 27 without a panel. What a PQ output needs is in the IOMFB template, which every template firmware runs: the mode set picks the timing's PQ colour element when one is asked for, and the swaps tag RGB surfaces BT.2020 with the PQ transfer function. Whether a timing has a usable PQ element is the firmware's own timing catalogue, which the atomic check already reads per mode. Admit PQ on every template firmware (12.3, 13.5, generic 14.7, H17P, 26.x desktop, 27) for an output without a panel, and keep the desktop 26.x panel as it was. The native 14.7 DCPLink session, the J613 26.6 session and the M4 path set modes outside the template and stay refused. A timing whose catalogue has no PQ element is still refused. Fixes: 2c3a662 ("drm/apple: Drive HDR output on desktop 26.x external displays") Suggested-by: Diljit Singh <hey@djdev.me> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ed() Commit 455b2e6 ("drm/apple: iomfb: admit PQ output by the IOMFB template, not three firmwares") added a new comment above dcp_hdr_output_supported() but left the old one in place directly above it. The old comment still lists three firmwares and says "the other processors ... keep SDR", which the function no longer does. Drop it. No functional change. Fixes: 455b2e6 ("drm/apple: iomfb: admit PQ output by the IOMFB template, not three firmwares") Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
|
Early note on this draft (no full review yet):
Assisted-by: LLM (Claude:Opus 5.5) |
Contributor
Author
|
Closing: the HDMI forwarding landed with #2230, and the HDR half still picks by firmware version; a replacement should key it on the template's capability. |
Contributor
Author
|
Reopened and kept as a draft; the comment above lists what it still needs before review. |
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.
Problem
Two drm/apple features were admitted by a list of chips or firmware where they were first tried, not by what they need.
dcp_hdmi_init()(dcp-hdmi.c:215, from 0960c7e) forwarded the DP-to-HDMI converter's IRQ_HPD service requests only onapple,t6030-dcpext. These requests are short HPD pulses, plus a poll after an HBR3 link configuration while the converter trains an HDMI FRL link. Every Mac with a native HDMI port has the same converter behind a DPTX port.dcp_hdr_output_supported()(iomfb.c:3184, from 2c3a662, 99df696, d5367c8) admitted a PQ commit only on the desktop 26.x firmware, the H17P external method profile, and firmware 27 without a panel. Everything a PQ output needs is in the IOMFB template, which all template firmwares run.Change
hdmi-hpdGPIO in the DCP's DT node. These boards have one: M1/M2/M3/M4 Pro/Max MacBook Pros, the Mac minis (M2 Pro, M4) and the Mac Studios in the tree (t600x-j314-j316, t602x-j414-j416, t603x-j514s-j516s-hdmi, t6040-j614s/j616s, t6041-j575c/j616c, t6020-j474s, t6021-j475c, t6022-j180d, t6050-j775d, t8112-j473). If a firmware does not take the sink IRQ call, it returns an error. That already stops the polling and is logged at a rate limit.Open PR #2230 changes the same
dcp_hdmi_init()condition (it addsapple,t6041-dcpext). Whichever PR merges second has a one-line conflict there. After this PR, the compatible list is no longer needed.Testing
drivers/gpu/drm/apple/dcp-hdmi.oandiomfb.ofollows).Still to run
dmesg | grep 'HDMI:'. Expected: either "forwarding converter service requests" or no HDMI line, and the display lights at its preferred mode. A 4K120 or higher HDMI 2.1 display on the J616s should train (FRL).hdmi-hpd): no change and no HDMI lines.drm_infolists the Colorspace and HDR_OUTPUT_METADATA properties. A 10-bit PQ BT.2020 commit (kwin/gnomeHDR toggle, ormodetest -w <conn>:Colorspace:9) is accepted and the display reports HDR. An SDR commit returns to SDR.Code credit
Chris Kearney wrote the HDMI converter forwarding. Ryan Murray and Diljit Singh wrote the HDR output path.
Assisted-by: LLM (Claude:Opus 5.5)