Repository navigation
Conversation
|
Review at feacb48 (non-author, draft). The power saving is worth having; the shape needs changes before it can land. What holds:
Changes needed:
Points to consider:
Assisted-by: LLM (Claude:Opus 5.5) |
|
The board check and the parameter are there because the J314s is the only machine I have measured and tried, not because I think the others differ. It is also the only one I have, so I can't produce the rows for the 16", the M2 Pro/Max laptops or the desktops myself. If the check goes, those rows have to come from people who have the machines, and I'm glad to help anyone who wants to try it. On the delays: I have not found any sign of readiness from the converter. HPD reaches the SoC with it off, and a connect sent too early simply times out. So the retry loop alone is what is left: connect, back off on a timeout, no boot constant. I'll measure what that costs from plug to picture. The reclaim should not sleep with the fabric lock held either, and I'll change that together with it. So the next version drops the board check and the parameter, has no fixed boot delay and no long wait under the fabric lock, and comes with an s2idle row with a display plugged in during the sleep. I need the laptop at the desk with the HDMI display for that, so it will take me a little while. |
25ab7d7 to
069c36f
Compare
The DP-to-HDMI converter behind the HDMI port is powered from probe on and draws about 0.6 W with nothing plugged in: on the 14" M1 Pro MacBook Pro (J314s) the machine idles at 2.09 W instead of 2.71 W with the screen off once dp2hdmi-pwren is low. 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. The connect is sent at once. The converter needs a little over two seconds to boot, which is longer than the connect waits for the link configuration, but on this connector a wait that runs out leaves the port connected, and the firmware raises HPD itself when the converter answers. So a cold converter needs no delay and no retry, and the callers of dcp_dptx_connect() see no new return value. The power-down work also releases a DPTX port that nothing released, which happens when the cable is pulled while the CRTC is off. Every DCP with a converter power GPIO and an HDMI HPD interrupt is managed. The external-native ones are left as they are: their output setup switches the converter itself. Signed-off-by: Andreas Fernandez <[email protected]>
069c36f to
49702d5
Compare
What: The DP-to-HDMI converter behind the HDMI port is powered from probe on and draws about 0.6 W with nothing plugged in: the J314s idles at 2.71 W instead of 2.09 W with the screen off. This powers it down 10 s after HPD goes low and up again at the next connect, which is sent at once. This is the second version, reworked after the review below: no board check, no module parameter, no boot delay, no retry and no wait under the fabric lock.
Tested: J314s M1 Pro at 49702d5 (candidate 2596602bfaf6 on main 972a566, plus a test-only commit for the HDMI rows): boots, the same failed units as plain main. The HDMI display stayed cabled; a test-only switch forced its HPD line low and released it, so the converter really went down and came back up: cold plug 2 of 2 (converter powered down 10.1 s after the unplug, powered up 0.51 s after the plug, firmware HPD at 3.11 s, first mode set at 3.42 to 3.43 s), warm plug with a 3 s gap 1 of 1 (converter kept on, port connected again 0.5 s after the plug), and one s2idle with the display attached (converter on and display connected after the wake; with #3639's device tree property).
Risk: two-way door · every Mac whose DT gives a DCP
dp2hdmi-pwren-gpiosand an HDMI HPD line and is not external-native (16 board files on main, M1 Pro/Max through M5 Max laptops, minis and Studios); only the J314s has run it.Not yet: any Mac but the J314s: it is the only one I have, and I'm glad to help anyone who wants to try it on theirs. A real cable plugged in during s2idle: the test switch makes no HPD edge at resume, and the connect comes from that edge with or without this change, so only a real cable can show it. An HDMI plug while a USB-C display holds the HDMI pipeline.
Details
On the review points:
no link configuration on port 0, HPD is the converter's), the port stays connected, and the firmware raises HPD itself when the converter answers, 2.1 to 2.2 s after power-up. So the connect goes out at once, nothing waits for the converter, and callers ofdcp_dptx_connect()see no new return value.dcp_typec_fabric_lock: nothing does now. The reclaim is left as main has it; v1's inline connect with its waits is gone with the retry work.Evidence
Kernel lines from the first cold plug (2596602bfaf6 with a test-only switch that forces the HDMI HPD line low; the cable stayed in):
The second cold plug gave the same figures to the hundredth of a second. In both, the firmware raised HPD a second time about 9.1 s after the plug, followed by a second mode set; the display stayed up.
Earlier, on main 3a6d154 with this version and my other drafts: cold plug 3 of 3 (converter powered up 0.50 to 0.51 s after the plug, firmware HPD at 3.10 to 3.11 s, first mode set at 3.42 to 3.43 s), powered down 10.0 to 10.4 s after the unplug, warm plug (3 s gap) 2 of 2 with the converter kept on, and the HDMI and a USB-C display arriving within seconds of each other 6 of 6 with the same Hyprland process. Idle figure: 2.71 W with the converter on, 2.09 W with
dp2hdmi-pwrenlow, screen off, nothing plugged in.Thanks for the review, and sorry it took a while!