Skip to content

soc: apple: display-gate: request T8122 storage by soc-device record - #2682

Merged
RyanTheTide merged 2 commits into
mainfrom
j615s2r/t8122-storage-record
Nov 28, 2026
Merged

RyanTheTide merged 2 commits into
mainfrom
j615s2r/t8122-storage-record

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

What: On T8122 the display gate marks the storage request by soc-device record too, so the PMP is asked for ANS and not for the record at ID - 1.
Tested: J615 (M3 Air) and J473 (M2 mini) at dc5faac, in one combined one-shot test kernel 7.3.0-aurora-dsw1 (main d8c6043 + this PR + 15 other drafts). This PR's files there are byte-identical to the current head 4dcde55 (= dc5faac + a clean merge of main). J615 (M3 Air, T8122): PMP handover reads requests 0x81800 on the test kernel vs 0x21800 on the fleet kernel, i.e. the storage request is on its soc-device record (bit 19), not ID - 1 (bit 17). NVMe 1 GiB cold read 2.2-2.3 GB/s, one 15 s s2idle rc 0, 0 failed units, 0 WARN/BUG. J473 (M2 mini, T8112, not reached by this change): boots, s2idle rc 0, no new error lines.
Risk: two-way · T8122 (J613, J615)
Not yet: the J613 row (the other T8122 Mac, where the PMP also runs with the GPU)

Evidence
Original description

Problem. On T8122 (M3: J613, J615) the PMP's power request and acknowledge bits are indexed by soc-device record, not by device ID - 1. The display gate already marks the display entry apple,soc-device-record for that reason. It leaves the storage entry (report@11, ANS, device ID 18) on its ID bit, 17, though. On these Macs bit 17 belongs to a different record (the device ID 14 record, report@d), so the PMP is asked to keep that block up, and ANS's own record bit, 19, is never set. The native T8122 path in pmp-report already expects ANS at bit 19 (apple_pmp_record_of_id(table, 18) != 19).

Change. Where the PTD is indexed by record (gate_soc->records), the display gate marks the storage entry apple,soc-device-record as well. The bit then comes from the PMP's own soc-device table, the same way the display entry's does. No new property, parameter or board check.

Testing. J615 (MacBook Air 15-inch, M3) on its default Stage 2 and the default kernel command line. Kernel: our T8122 sleep trial tree plus this commit, same file and hunk as here.

  • T8122 PMP handed over: requests 0x80800 (was 0x20800), and request bits 0x80800 are soc-device records.
  • The PMP starts, PMP ready: ... ack 0x8f0. The display record is acknowledged, and ANS is not, as its record's flags say. Before, the PMP acknowledged bit 17, i.e. it was keeping the other record's block up.
  • NVMe: 1 GiB direct read at 3.5 GB/s, no NVMe errors. The internal panel stays connected.
  • Two s2idle rounds (PMU RTC, 20 s): rc 0, 19.6 s wall clock. 0 failed units.
  • checkpatch --strict clean. display-gate.o builds on this base with W=1.

Still to run. A J613 row (the other T8122 Mac). There the PMP runs with the GPU, so this changes what it is asked for at start: ANS instead of the device ID 14 block.

Detail for reviewers
  • How it was found: lane J615-S2R2 (T8122 deep sleep, soc: apple: J613 (T8122) suspend-to-RAM on the shared T8142 sleep framework (draft: wake unshown) #2572). A test that set every PMP report entry always-on failed with no unique request bit for /soc/pmp_report@2d03c0000/report@11. The added scodec entry (record 17) collided with the storage entry's ID bit 17.
  • Why the bits are records: with the old request 0x20800, the PMP's unrequested ack bits are 4-7. Those are the records of the always-on SoC and CPU-cluster devices, which only fits record indexing.
  • Records vs ID bits on the J615's soc-device table: ID 8 (DISP) is record 11, ID 18 (ANS) is record 19, ID 14 is record 17.
  • Effect on T6031 (report@21): none. records is set for T8122 only.
  • Row logs: traces/power/20261121-j615-s2r2/row-stor.log, stor-*-dmesg.txt on our store.

On T8122 the PTD request and acknowledge bits are indexed by soc-device
record, not by device ID - 1. The gate already marks the display entry
apple,soc-device-record for that reason, but left the storage entry
(report@11, ANS, device ID 18) on its ID bit, 17. On T8122 that bit is
another record's (the device ID 14 record, report@d), and ANS's own
record bit is never set. The native T8122 path in pmp-report already
expects ANS at its record, bit 19.

Mark the storage entry by record too, wherever the PTD is indexed that
way (gate_soc->records). The bit then comes from the PMP's own
soc-device table, as the display entry's does.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looks good; approve once a J613 row and a J615 row run on this head.

  1. drivers/soc/apple/display-gate-test.c:309-315: gt_expect_enabled() checks apple,soc-device-record on the display entry only. The new storage marking is untested, and the KUnit suite passes with or without this commit. Add the same KUNIT_EXPECT_EQ(..., s->soc->records) for s->ans. Also add the matching KUNIT_EXPECT_FALSE for s->ans in the disabled case (:276).
  2. The J615 row ran on a sleep trial tree, not on this head on integration/aurora. A 27.2-stub J615 on integration/aurora stops at the PMP image pin (drivers/soc/apple/display-gate.c:165, :769-772) before gate_reuse_apply() runs. So the row has to say which PMP image ran, and on 27.2 it needs linux#2688 under it. Otherwise this code is never reached.

The change itself is right. pmp-report resolves every marked entry through apple_pmp_report_record() (drivers/pmdomain/apple/pmp-report.c:920-942), both in the start seed (:1199-1209) and in the runtime entry probe (:3398). So ANS's genpd votes, not just the seed, move from bit 17 to its record bit 19. That matches the native T8122 check (:998-1003). After this, every available T8122 report entry is requested by record: display and storage here, and the external display entry on the dcpext path (display-gate.c:1977). records is set only for T8122 (:283), so T6030/T6031 are unchanged. gate_add_bool() doesn't duplicate the property that the J613 25G83 dtsi already sets. Signed-off-by is human, there are no agent trailers, and CI is green.

Nit: the remaining T8122 entries (report@5/6/9/a/b/c/d, t8122.dtsi:776-863) are disabled and still ID-indexed. Whoever enables one hits this same bug. Marking the record indexing once on the T8122 report would cover them all.

HW row: on dc5faac on integration/aurora (plus linux#2688 if the Mac runs the 27.2 stub), default command line. J613 and J615 each log requests 0x80800 and request bits 0x80800 are soc-device records, PMP ready, the panel on appledrm, the GPU up (J613), a 1 GiB NVMe read with no errors, s2idle 2/2, 0 AVC, 0 failed units and 0 new kernel errors.
Assisted-by: LLM (Claude:Opus 5.5)

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The storage request now uses the same record-indexed PMP convention as the display request, under the existing SoC capability and in the same changeset. J615 shows the expected active-mask change and J473 provides a control. Keep hosted checks and the second T8122 J613 row pending.

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 4dcde552. App approved, rows J615+J473. Merges 1 h from now under the 6-point rule once hosted CI is green, unless you object.

@github-actions

Copy link
Copy Markdown

Merge readiness at 4dcde552: not ready yet

Check Detail
CI at head no failing: pr-text / pr-text, pr-text / pr-text
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok in the PR body at 4dcde552
Conflicts ok none
PR text ok Risk: two-way · T8122 (J613, J615)

Areas: area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at 4dcde552. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: J615+J473. (5) There's no blocking review. (6) Dj was pinged here 323 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 3a6d154 into main Nov 28, 2026
26 of 31 checks passed
@RyanTheTide
RyanTheTide deleted the j615s2r/t8122-storage-record branch November 28, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:platform Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant