Skip to content

drm/apple: dcp: power the J314s HDMI converter only with a display - #510

Closed
Ante042 wants to merge 1 commit into
omacom:integration/aurorafrom
Ante042:drm-apple-hdmi-converter-on-demand
Closed

Ante042 wants to merge 1 commit into
omacom:integration/aurorafrom
Ante042:drm-apple-hdmi-converter-on-demand

Conversation

@Ante042

@Ante042 Ante042 commented Nov 20, 2026 •

Copy link
Copy Markdown

Hi everyone! This one comes out of chasing idle power on my M1 Pro (J314s), and it is the largest single item I found there.

The DP-to-HDMI converter behind the HDMI port is powered from probe on, and it draws about 0.6 W whether or not anything is plugged in. With dp2hdmi-pwren low the machine idles at 2.09 W instead of 2.71 W with the screen off. The connector's HPD still reaches the SoC with the converter off, so it does not need to be powered to notice a display.

The patch powers the converter down 10 s after HPD goes low and up again at the next connect. It needs about 1.5 s to boot and a connect sent earlier times out, so dcp_dptx_connect() returns -EAGAIN for a converter it had to wake and a delayed work connects the display once it is up, in up to three tries. From plug to picture that makes about 3.5 s. The power-down work also releases a DPTX port that nothing released, which happens when the cable is pulled while the screens are off.

There is one place where the connect cannot be left to that work, and it took me a compositor crash to find it. When an HDMI display is plugged in while a USB-C display sits on the hybrid pipeline, the reclaim holds the fabric lock until the USB-C display is back, and the work needs the same lock. So the HDMI display always connected last, the USB-C display was paired with the hybrid's CRTC again, every mode of it was refused and Hyprland aborted. The reclaim now connects inline, the way the work does, and only then lets the USB-C display return.

I've limited it to apple,j314s, since that is the only machine I measured and tried it on, and appledrm.hdmi_converter_idle_off=0 switches it off there. Every other machine keeps the converter powered as before. The one thing they do get is two new log lines in the reclaim, saying how long the HDMI display took to connect or that it did not make it in time. The J316s should behave the same, but I can't check that.

Now the important part about testing, and the reason this is a draft: I have not booted a kernel built from this commit. I run this change on a local 7.3 tree, where it has been in daily use since the 13th: boot with and without the cable, plug and unplug with the screens on and off, a monitor that pulses HPD when it wakes, and today five plugs with USB-C displays attached (three with a cold converter, one warm, one where no reclaim was needed). In the four reclaim rounds the HDMI display was connected about 0.3 s after its link request, and the same Hyprland process was still running after all five. All of that ran with a second change loaded that this pull request leaves out: it tells the firmware at once when an HDMI display drops HPD. So the patch has not run on its own even there. That tree differs from this one, though. It has a delayed HDMI connect of its own from out-of-tree suspend-to-RAM work, which this patch has to bring along, and it powers the converter down across sleep. Here the converter is left as it is over s2idle, and I have not tested s2idle with it at all. What I did on this base is build it: the module builds with W=1 against the 7.2.11.aurora16 headers with no new warnings, and checkpatch is clean. One KUnit fixture builds its device by hand and needed the two new works initialised. I could neither compile nor run the KUnit suites here, since those headers have KUnit off, so that part is unverified until CI builds it.

The tested version, together with that companion change, is on a reference branch. I'd like to boot this one on the J314s before taking it out of draft, and I'm glad to change the approach if it should live somewhere else. Thanks for looking, and for all the work on the fabric code!

The DP-to-HDMI converter behind the HDMI port of the 14" M1 Pro MacBook
Pro (J314s) is powered from probe on and draws about 0.6 W with nothing
plugged in: with dp2hdmi-pwren low the machine idles at 2.09 W instead
of 2.71 W with the screen off.  The connector's HPD reaches the SoC
without the converter, so it does not have to be on to see a display
arrive, and macOS keeps it off until then.

Power the converter down 10 s after HPD goes low, and up again at the
next connect.  It takes about 1.5 s to boot and a connect sent before
that times out, so dcp_dptx_connect() returns -EAGAIN for a converter it
had to power up, and a delayed work connects the display once it has
booted, in up to three tries.  The power-down work also releases a DPTX
port that nothing released, which happens when the cable is pulled while
the CRTC is off.

One caller cannot leave the connect to that work.  When the HDMI display
takes the hybrid pipeline back from a Type-C display, the reclaim holds
the fabric lock until the Type-C display is back, and the work needs
that lock.  The HDMI display would always connect last, the Type-C
display would be paired with the hybrid's CRTC again and a compositor
would find every mode of it refused.  The reclaim connects inline
instead, the way the work does, and logs how long the HDMI display took.

Only the J314s is managed, where this was measured and tried, and
appledrm.hdmi_converter_idle_off=0 turns it off there.  On every other
machine the converter stays powered as before.

Assisted-by: Claude:claude-mythos-5-2
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andreas Fernandez <[email protected]>
@Ante042

Ante042 commented Nov 22, 2026

Copy link
Copy Markdown
Author

Hi! Kernel work has moved to aurora-silicon/linux, so this one continues there as aurora-silicon/linux#2837, rebased onto the current integration/aurora. Closing it here. Thanks!

@Ante042 Ante042 closed this Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant