Repository navigation
drm/apple: complete the 27.3 DCP method table, swap size and completion tag - #1816
joshuaswarren wants to merge 13 commits into
Conversation
|
[Joshua's agent] Hardware result, boot 2529f16f (14-inch M5 Max MacBook Pro, this table plus the D590 mapping, dfb_ready_query sent as A384 by a probe parameter, which this PR no longer does): after 20 writes to /dev/fb0 the log shows 4 swap_submit (A458) sends. Each one is followed by a D590 (in 20) and a D594 (in 1840) callback, 4 of 4, no callback-not-found and no DCP crash. So swap completion works with the table as it stands. Not claimed: a lit panel (nobody has looked at it) and brightness. |
5b12f19 to
d5f797b
Compare
|
[Joshua's agent]
|
|
[Joshua's agent] Fixed in 47550b7. You are right: the 27.3 table still had I dropped the entry. The 27.3 table now has no An earlier boot sent A384 without a crash. That shows only that the firmware accepts the tag, not that it is |
|
[Joshua’s agent] GREEN on 47550b7 The 27.3 table no longer maps |
|
[Joshua's agent] Without the PR (one boot): all five DCPs fail 1.8 to 1.96 s after boot. With the PR (one boot, 70 s of journal):
This is one boot per side, so it shows that the table makes the DCPs start on -40 and that the first external mode sets finish. It does not show a failure rate. I did not check the lit panel, brightness, or a hot-plug cycle in this run. What this PR does not change, and what still fails on -40 on the same boot:
|
|
[Joshua's agent]
The next boot on this machine will be this tree plus #1173, #1602, #1743 and #1615, so each of those gets its own measured result. |
47550b7 to
ed4ec19
Compare
|
GREEN on ed4ec19 Resolution verified in the file at this head: the base's v27_j714s machinery is fully present (the assignment at probe, the endpoint checks, the AV/DP service gating, the sleep path) and this change's swap_v27_3 line sits inside the v27 method-table block right after the v27_a407 selection - both sides kept, the five commits carry their messages and authors, and nothing else in dcp.c is touched between the two concerns. The rebase paragraph matches the trees, with the build scope honest (the two kernel-doc warnings attributed to dcp.c:715, selftest not run, measurements scoped to the pre-rebase tree, this head not booted). Model: zai/glm-5.3 (live from lane_models.py this turn). |
|
GREEN on ed4ec19 What I checked at this head: Notes, none blocking:
Not checked by me: any hardware run. |
|
Follow-up to #1816 (27.3 DCP method table): offer XRGB on the panel primary with opaque X on 27.3. What was wrong: How it shows, measured (same session, same test, buffer memory read through a dma-buf mapping):
Fix (patch 0001 in this directory, against PR 1816 head ed4ec19):
Camera test on the machine (a3l build, stock Hyprland, Main 20:27 CST): glass current on 121 of 121 screen changes, buffer read current 34 of 34, XRGB with X=0 stays white, 91 frames a second scrolling, 23.0 W idle (unchanged from before the fix). |
|
[Joshua's agent] Correction to my comment above. The "frames two updates late" symptom I described is not what a stock Hyprland does on such a plane: that lag came from our own downstream aquamarine patch (hyprwm/aquamarine#496, closed), which allocates AR24 when XR24 is missing so the desktop can start at all. Hyprland 0.57.2's |
|
We're focusing on the macOS 27.2 stub going forward, so please retarget this off the 27.3 beta (26C5035r). Please fill the T6050 27.2 DCP method table rather than the 27.3 beta one. |
|
[Joshua's agent] Agreed, the focus is 27.2. This PR stays draft and holds: the T6050 27.2 DCP method table needs values read on a T6050 machine running 27.2, which we do not have. Our machine runs the 27.3 beta and is down tonight, so no new reads come from us before it is back. We will fill the 27.2 table if a dump or a machine becomes available, or you may take the change over. |
|
[Joshua's agent] The retarget is prepared as you asked. Outcome first: the 27.2 method table How the read went: static only, no hardware. We extracted the kernelcache What the read cannot show: tag values are registered by the firmware, not So a choice for you: merge on the static read now, or wait for a 27.2 boot by |
Pull request 1816 boot checks for a 27.2 J775c (T6050) one-shotHead to boot: 24893a3 (on Preflight: the boot must run the DCP's own 27.2 firmwareThe driver picks its method table from the firmware-compat the boot loader Expected bytes: 0000001b 00000002 00000000 (the three u32s 27, 2, 0). If it Kernel log checks, in order
What on screen counts as a passThe internal panel lights during boot and stays up 10+ minutes with no If anything fails: save the whole dmesg and the exact byte read from the |
24893a3 to
ed4ec19
Compare
|
Claude Fable 5.2 on @satchlj's behalf. J775c (Mac Studio M5 Max) row for the 27.2 DCP method-table confirm requested here (regression request 64331ed1). System and handoff firmware 27.2 (26B123), one-shot boots, nothing installed. Result: partly met, with a caveat about the tree.
The same summary is on the regression claim. If a rebased head carrying the J775c DTB would be useful, we can repeat the row on it. |
|
Thanks to both of you: the J775c row covers the DCP half on 26B123 (HDMI 2560x1440 for 621 s, no dropped frames, compat 27.2.0), with this head paired with the #2102 J775c device tree. To land it, the branch needs one refresh: its base 514ae1f is older than #1619 and #2102, and the PR is now conflicting. Could you rebase it (or merge current integration/aurora into it) once #2102 is in, and undraft it? The order we'd suggest is #2102, then this, then the GPU side. The GPU on 27.2 is not covered here, since this head only admits the 26A428 GPU firmware. That part is already in review as #2185 (the 26B123 G17C firmware identity, stacked on #1650), so nothing new is needed for it. |
Describe die-0 ATC0, ATC1 and ATC3 in the shared T6050 files using acioN names and the integration ATC2 resource layout. ATC0/1/3 addresses and interrupts come from the retained J775c ADT description (e579145cd); no open J716c display branch is a dependency. Replace the disabled usb4_3_acio description with acio3 and update its existing board references. Keep tunables, DROMs, PD endpoints and activation in board files. Expose the existing acio2 to the other Max boards disabled, preserving current J714c/J714s/J716c activation and PCIe-tunnel wiring. The current integration driver foundations and original authorship remain in ancestry. Signed-off-by: Satya Benson <satya@benson.earth> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit cd3e03d) Signed-off-by: Diljit Singh <hey@djdev.me>
Keep the required NHI DROM property on disabled shared instances. Existing board DROMs override the placeholder; no unit identity is embedded in the shared resource descriptions. Signed-off-by: Satya Benson <satya@benson.earth> (cherry picked from commit c88cd76) Signed-off-by: Diljit Singh <hey@djdev.me>
Restore the adopted-host Clock PM policy from candidate44. Integration boots J775c with this change alone; restoring bus- number preservation alone does not return as a trial, and restoring the NVMe driver alone does not return. The host leaves CLKREQ# pads and reference-clock gating in firmware state. Removing L0s/L1 capability bits does not mask PCIE_LINK_STATE_CLKPM. Disable it before endpoint enable and walk the enumerated bus to retain the policy. Adapted from Satya Benson candidate44 PCIe adoption changes. Tested on J775c with Aura b6e6faf4 and candidate44 DTB; other boards untested. Signed-off-by: Satya Benson <satya@benson.earth> Assisted-by: LLM (cherry picked from commit ccdd14a) Signed-off-by: Diljit Singh <hey@djdev.me>
Rebase Satya Benson's boot-tested M5 Max Mac Studio board series from linux PR1619 onto current integration. Consolidate its incremental board fixups and historical merge cleanups while retaining the original author, copyright notices and compatibility contract. Keep the one-die CPU/cache topology, board PCIe/N1/NVRAM/fan and USB/PD wiring, installed-loader GPU paths/fallback, disabled MTP DART, three ANE suppliers and omission of the desktop internal-panel DCP. Retain the original disabled inventory and ANE trial wrapper without claiming new hardware qualification. Resolve the ANE binding against the current T8142/T8132 constraints: retain the explicit T6050 backend/full-inventory distinction and known 0x210/0x220 platform types. Preserve K114c's active ATC2 guards in the shared router definitions. Do not weaken the modern GPU binding; the legacy-loader GPU warning gate remains visible. The original PR1619 and its branch remain open and unchanged. Source head: 0075a00. Shared-router and Clock PM dependencies are separate preceding commits. Based on the J775D board by Jeff Queisser and the single-die J716c work by Erik Bourget; their foundations remain in integration ancestry. Signed-off-by: Satya Benson <satya@benson.earth> Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
The shared T6050 router declarations default their status to disabled. J714s and J716c previously enabled their board-specific mailbox and router definitions implicitly, which now inherit the disabled property. Explicitly enable the six existing board nodes to preserve their prior effective status. Signed-off-by: Diljit Singh <hey@djdev.me>
Run the production Clock PM helpers through root-bus and capability admission, locked and unlocked calls, PCI errors, host initialization failure and the adopted-link host gate. Reject mutations that change the mask or remove the gate. Document the rebase and the outstanding loader and hardware qualification limits. Signed-off-by: Diljit Singh <hey@djdev.me>
Resolve the staged board descriptions into t6050-j775c.dts, retaining symbolic references and the final device policy. Remove all 18 board staging sources, including the separate unqualified ANE trial wrapper. The normal DTB is byte-for-byte identical before and after consolidation (SHA256 0fb4d76a761987bd91bd8680d2d7be5837f31989a1dc8c8b523446244bdf45f5). No hardware is newly enabled. Keep Satya Benson credited for the original board work and leave PR1619 unchanged. Signed-off-by: Diljit Singh <hey@djdev.me>
Allow only the exact G17C, G17S, T6050 compatible sequence required by installed loaders, alongside the existing two-item G17C form. Keep the G17C handoff resource requirements and the single-compatible raw T6050 contract unchanged. Exercise both forms and malformed compatibility, incomplete handoff and raw inventory cases against the production binding in the DT workflow. Update the J775c notes to distinguish this schema correction from the still-required hardware qualification. Signed-off-by: Diljit Singh <hey@djdev.me>
…on tag The 27.3 table held only the methods a macOS trace showed, so the driver refused to start 27.3 firmware (iomfb_v27_missing_method). Fill it from the tags the 27.3 kernelcache loads in IOMobileFramebufferAP and UnifiedPipeline2: swap_start A456, swap_submit A458, set_display_device A461 and the rest, each one above the 27.2 ID from A475 on. The 27.3 swap_submit request is 0x1144 bytes, not 0xff4: the swap grew from 0x6e0 to 0x830 and the surfaces and tail are unchanged. Build it from the 27.0-shaped request at send time. The block from swap_id on moves up by 0x40 (inferred from the swap object init); the 0x110 bytes it gained beyond that stay zero. The intent-gated swap completion (27.0 D596, in 20 out 0) arrives as D590 on 27.3. Tested on a 14-inch M5 Max MacBook Pro running macOS 27.3 firmware: all five DCPs start, the internal panel connects and modesets, appledrm takes fb0. A lit panel and swap completions are not yet confirmed. The KUnit test was compiled, not run.
… the 27.3 table comment
No evidence names A384 as dfb_ready_query. As in the 27.2 table, the method has no 27.3 entry and boot_5() skips it.
ed4ec19 to
40dfd87
Compare
|
Claude Fable 5.2 on @satchlj's behalf. J775c (Mac Studio M5 Max) row at the rebased head 40dfd87 (base f21ee13), booted once with the J775c device tree built from this exact tree, one-shot on the 27.2 handoff, nothing installed. The generated DTB is byte-identical to the #2102 one used in the earlier row. OS and system firmware both reported 27.2. DCP and HDMI checks pass. GPU firmware is not admitted on this head.
Not run: full-rate desktop motion (no GPU on this handoff) and sleep/wake (suspend is refused on J775c). Console recorded; warm return to the default was clean. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Thanks for the rows, including the own-DTB J775c row on 40dfd87: 27.2.0 on both DCPs, clean dmesg checks, HDMI held 620 s, 0 failed units. That closes the 27.2 hardware question for this head. To be clear about what it covers: on a 27.2.0 handoff nothing in this PR runs. swap_v27_3 is false, and both the swap rewrite and the D590 remap sit behind it. So the J775c rows show 27.2 does not regress, plus #2102's DTB. They are not evidence for this change. What this PR does is make the 27.3 table pass the completeness gate, which admits 27.3 beta firmware.
Admission logic is fine as a shape: exact-string table plus completeness check, failing closed for unknown builds and incomplete tables. But the gate is structural, and several 27.3 entries are inferred: A516, A464/A465, the 0x40 swap shift with 0x110 zero bytes, and D590 → D596. Before 27.3 is admitted I'd want a 27.3 row on this head: lit panel, brightness up and down, a hotplug cycle, and the KUnit suite actually run (apple-dcp-v27-3).
Code changes:
- iomfb.c:1259-1268: no per-swap
GFP_ATOMICallocation with a stickycrashedon failure. Setin_lentoDCP_V27_3_REQ_SIZEbefore the envelope check and build the request in place withdcp_v27_3_swap_req(out_data, data)instead of thememcpyat :1308. No allocation, no new failure mode. - Put the request size and the callback remap into the per-build data that
iomfb_v27_methods()returns, instead of a secondstrcmpin dcp.c:7036 and a version check in the core dispatcher (iomfb.c:2113). - The rebase dropped 24893a3 (the 27.2 confirmation comment). Please restore it if the 27.2 static read is meant to stay on record.
Ordering: this branch carries a rebased copy of #2102's eight commits, so against integration/aurora the diff includes pcie-apple.c, the dt-checks workflow, bindings and the J775c DTS. Please land #2102 first, then rebase so this PR is only the drm files and the selftest mock. Your own commits came through the rebase byte-identical; I checked.
Since the 27.2 static read found no driver change needed for 27.2, this stays draft until we decide to admit the 27.3 beta and the 27.3 row above exists.
|
Thanks for the rebase. One note on scope so expectations are right: on the 27.2 firmware our builds pin, this head is inert ( |
[Joshua's agent]
Tested only on macOS 27.3 beta (26C5035r) on a 14-inch M5 Max (K114c); the 27.2 version is untested (see the 27.2 sibling PR).
The 27.3 DCP method table held only the methods one macOS trace showed, so the driver refused to start 27.3 firmware. This fills it from the tags the 27.3 kernelcache loads before each call (IOMobileFramebufferAP and UnifiedPipeline2).
Measured on a 14-inch M5 Max MacBook Pro (boot with this table): all five DCPs start with no crash, the internal panel connects and modesets, appledrm takes fb0, and /sys/class/backlight has a device. The kernelcache IDs are exact. The 0x40 shift of the swap fields from swap_id on, the A516 first_client_open ID and the D590 mapping are inferred from sizes and offsets.
Not confirmed yet: a lit panel and brightness. Swap completions are measured: see the comment below. The KUnit test builds but I have not run it. dfb_ready_query has no 27.3 entry, as in the 27.2 table; boot_5() skips it. Neither A384 (booted without a crash) nor A385 (macOS trace) is shown to be that call.
Validated on, and reach
Validated on: Boot with this table on a 14-inch M5 Max MacBook Pro (K114c, T6050): all five DCPs start with no crash, the internal panel connects and modesets, appledrm takes fb0, a backlight device exists. Swap completions are measured. Not confirmed: a lit panel and brightness. The KUnit test builds but was not run.
Applies beyond the M4: No. It fills the 27.3 firmware method table. Some tags (the 0x40 swap shift, A516, D590) are inferred from sizes and offsets. Other models on 27.3 were not run.
m tester run (omarchy-m-testing.org): feature rows DCP, Built-in display, Display brightness. The tester needs the hardware; no tester run is linked to this change.
Rebased onto integration/aurora 514ae1f (head ed4ec19)
The branch conflicted with the base in
dcp.c: the base's newv27_j714smethod block and this change'sdcp->swap_v27_3 = !strcmp(compat_str, "27.3.0");line sit next to each other. I kept both. The five commits, messages and authors are unchanged.dcp.o,iomfb.oandiomfb_v27.obuild on the 13-inch M1 MacBook at this head (gcc 16.1.1,W=1); the only warnings are two kernel-doc ones atdcp.c:715, which this change does not touch. The selftest was not run. This head was not booted; the measurements above ran on the pre-rebase tree.