From 9170e656767a4cfb8ddd684db78bca3646538957 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 01:14:46 +1100 Subject: [PATCH 1/3] drm/apple: forward HDMI converter service requests on every native HDMI 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: 0960c7e9ef117 ("drm/apple: forward HDMI converter service requests on t6030") Suggested-by: Chris Kearney <303316+iconidentify@users.noreply.github.com> Signed-off-by: Ryan Murray --- drivers/gpu/drm/apple/dcp-hdmi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/apple/dcp-hdmi.c b/drivers/gpu/drm/apple/dcp-hdmi.c index 0603de2a0e229..d2b214da00ef2 100644 --- a/drivers/gpu/drm/apple/dcp-hdmi.c +++ b/drivers/gpu/drm/apple/dcp-hdmi.c @@ -1,11 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT /* - * HDMI port of the T6030 (M3 Pro) MacBook Pros. - * - * The port hangs off the first external display coprocessor: it drives - * ATC3 as a four-lane DisplayPort PHY into an on-board DP-to-HDMI - * converter. Power, hotplug and the fixed route work as for the M1/M2 Pro - * MacBook Pro HDMI port (hdmi-hpd, hdmi-pwren and dp2hdmi-pwren GPIOs, see + * Native HDMI ports: an external display coprocessor driving a DisplayPort + * PHY into an on-board DP-to-HDMI converter, as on the M1 and later Pro/Max + * MacBook Pros, the Mac minis and the Mac Studios. Power, hotplug and the + * fixed route use the hdmi-hpd, hdmi-pwren and dp2hdmi-pwren GPIOs (see * dcp.c and dcp-fabric.c). * * Like any DisplayPort sink, the converter asks the source for service by @@ -19,7 +17,10 @@ * the rate those modes use, because not every request of the converter * shows up as a pulse on the GPIO. * - * Only the T6030 external coprocessor with a fixed HDMI route uses this. + * Every coprocessor with a fixed HDMI-A connector and an HDMI HPD GPIO in + * its DT node uses this: IRQ_HPD is DisplayPort protocol, and the converter + * sits behind the same DPTX port on every such board. A firmware that does + * not take the request answers it with an error; that stops the polling. */ #include @@ -211,8 +212,7 @@ int dcp_hdmi_init(struct apple_dcp *dcp) int ret; if (!dcp->hdmi_hpd || - dcp->fixed_connector_type != DRM_MODE_CONNECTOR_HDMIA || - !of_device_is_compatible(dcp->dev->of_node, "apple,t6030-dcpext")) + dcp->fixed_connector_type != DRM_MODE_CONNECTOR_HDMIA) return 0; hdmi = devm_kzalloc(dcp->dev, sizeof(*hdmi), GFP_KERNEL); From 455b2e67f8d65f0d16a3aff5490b03c922d1a0be Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 01:14:51 +1100 Subject: [PATCH 2/3] drm/apple: iomfb: admit PQ output by the IOMFB template, not three firmwares 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: 2c3a6626ad4ce ("drm/apple: Drive HDR output on desktop 26.x external displays") Suggested-by: Diljit Singh Signed-off-by: Ryan Murray --- drivers/gpu/drm/apple/iomfb.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/apple/iomfb.c b/drivers/gpu/drm/apple/iomfb.c index 1f3e97e6c5e9f..056f52976a3a6 100644 --- a/drivers/gpu/drm/apple/iomfb.c +++ b/drivers/gpu/drm/apple/iomfb.c @@ -3181,13 +3181,32 @@ int dcp_takeover_trial(struct platform_device *pdev, const char **reason) * the external H17P processor and the firmware 27 external processors. The * other processors, and the firmware 27 panel, keep SDR. */ +/* + * A PQ output needs a mode set that selects the timing's PQ colour element + * and swaps that tag the surfaces BT.2020 PQ. The IOMFB template + * (iomfb_template.c) does both for every firmware it is built for; the + * native 14.7 DCPLink session, the J613 26.6 session and the M4 path set + * modes elsewhere and do not. Whether a timing has a usable PQ element is + * the firmware's own catalogue, checked per mode by the caller. A panel + * keeps its SDR link (dcp_panel_edr_supported()), except on the desktop + * 26.x firmware, which has driven PQ through the template since its start. + */ static bool dcp_hdr_output_supported(struct apple_dcp *dcp) { if (iomfb_is_m4(dcp)) return false; - return dcp->fw_compat == DCP_FIRMWARE_V_26_6_DESKTOP || - dcp->hw.iomfb_method_profile == DCP_IOMFB_METHODS_H17P_EXTERNAL || - (dcp->fw_compat == DCP_FIRMWARE_V_27_0 && !dcp_has_panel(dcp)); + switch (dcp->fw_compat) { + case DCP_FIRMWARE_V_26_6_DESKTOP: + return true; + case DCP_FIRMWARE_V_12_3: + case DCP_FIRMWARE_V_13_5: + case DCP_FIRMWARE_V_14_7_TEMPLATE: + case DCP_FIRMWARE_H17P: + case DCP_FIRMWARE_V_27_0: + return !dcp_has_panel(dcp); + default: + return false; + } } /* From 7586f2d407da9837fccc15602d5f7fc473201486 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Fri, 20 Nov 2026 01:25:26 +1100 Subject: [PATCH 3/3] drm/apple: iomfb: drop the stale comment above dcp_hdr_output_supported() Commit 455b2e67f8d6 ("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: 455b2e67f8d6 ("drm/apple: iomfb: admit PQ output by the IOMFB template, not three firmwares") Signed-off-by: Ryan Murray --- drivers/gpu/drm/apple/iomfb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/apple/iomfb.c b/drivers/gpu/drm/apple/iomfb.c index 056f52976a3a6..509870f416dfe 100644 --- a/drivers/gpu/drm/apple/iomfb.c +++ b/drivers/gpu/drm/apple/iomfb.c @@ -3175,12 +3175,6 @@ int dcp_takeover_trial(struct platform_device *pdev, const char **reason) return ret; } -/* - * PQ output goes through the IOMFB template's mode set, which picks the - * timing's PQ element (see dcp_display_mode.pq): the desktop 26.x firmware, - * the external H17P processor and the firmware 27 external processors. The - * other processors, and the firmware 27 panel, keep SDR. - */ /* * A PQ output needs a mode set that selects the timing's PQ colour element * and swaps that tag the surfaces BT.2020 PQ. The IOMFB template