Skip to content

drm/apple: T8103: J313 backlight and handed-over panel, keyboard light, SIO alias on every board - #2151

Open
scottjones wants to merge 49 commits into
aurora-silicon:integration/aurorafrom
scottjones:upstream/t8103-j313
Open

scottjones wants to merge 49 commits into
aurora-silicon:integration/aurorafrom
scottjones:upstream/t8103-j313

Conversation

@scottjones

Copy link
Copy Markdown
Contributor

Stacked on #2148. Until that merges, this PR also shows its commits.

Summary

Fixes for the M1 MacBook Air (J313) and the other T8103 boards:

  • drm/apple: on firmware older than 26, answer eDP for the backlight service the way 26 and newer do, and cap J313 at 394 nits (the firmware drops 395 and above);
  • drm/apple: clamp J313 backlight readback to the panel maximum;
  • drm/apple: power-cycle the J313 panel once on DCP 13.5 when the boot loader handed it over lit, so brightness changes reach it (a follow-up moves the cycle into its own helper so backlight-coldboot-tests.py, which compiles dcp_poweron() on its own, can stub it);
  • leds: pwm: keep the period from pwms when the hardware reads back period 0 (Apple FPWM out of reset), instead of forcing the keyboard light off at probe;
  • dts: t8103: move the sio alias to t8103-jxxx.dtsi so every T8103 board gets SIO, and with it DisplayPort audio.

Evidence

  • Built on integration/aurora a7dd26e6d60e with the 7.3 package config, LLVM 18 and Rust 1.85 (this branch includes PR 4 underneath, so these results cover those commits too):
    • make W=1 drivers/gpu/drm/asahi/g15/glue.o drivers/gpu/drm/asahi/g15/uat_glue.o drivers/leds/leds-pwm.o drivers/pmdomain/apple/pmp-report.o drivers/iommu/ drivers/gpu/drm/asahi/ drivers/gpu/drm/apple/ drivers/soc/apple/: builds
    • W=1: no warnings the base does not have
    • make dtbs: builds, no warnings
    • scripts/dtc/apple-dt-check.sh (CHECK_DTBS base vs head): 0 new warnings, 7 fewer; dt_binding_check passes on the 4 changed bindings
    • run-host-tests.py: every tools/asahi test is registered
    • tools/asahi host tests (control and mutation runs): backlight-coldboot-tests 2/2, dcp14-panel-tests 1/1, g15-display-order-tests 1/1, g15-j514c-display-default-tests 1/1, g15-j514c-firmware-tests 1/1, g15-maintained-handoff-tests 2/2, g15-probe-init-tests 2/2, g15-t6034-profile-tests 1/1, g15-zero-words-tests 2/2, t6030-display-admission-tests 2/2, t6030-pmp-graph-tests 2/2, t6030-pmp-supplier-tests 2/2, t6034-display-tests 1/1
    • Full tools/asahi/run-host-tests.py: backlight-coldboot-tests.py passes (control and negative controls) with the follow-up commit; it failed with Naeem's commit alone.
    • Stacked with the other 12 PRs on the same base, the full kernel, modules and DTBs build and package (linux-aurora 7.3.0-0testastip2-1-ARCH, 137 DTBs).
  • Booted as part of the full set: a kernel built from integration/aurora a7dd26e6 plus all 13 branches of this set (before the three small fix-up commits) booted on an M3 MacBook Air (J613), a Neo (J700) and an M1 Pro with no regressions against their baselines (on the M1 Pro, only the checks already known to differ: GPU name and DRAM OPP), and a 25-minute GPU soak was clean on all three. No M3 Pro, M3 Max, J504, J615 or M4 Pro ran this kernel.
  • The J313 measurements are in the authors' commit messages (MacBook Air M1, DCP 13.5, on a 7.2 kernel). We had no J313 in our own runs.

Merge Danger

Door: two-way

Blast Radius: T8103

M1 boards, plus leds-pwm only where the hardware period reads back as 0. The backlight-coldboot test harness gains one stub. Stacked on the M3 Max PR (the J516C EDID change touches the same dcp.c); it shows those commits until they merge.

🤖 Generated with Claude Code

DjDeveloperr and others added 30 commits November 18, 2026 03:32
Document the display consumer's optional DMA aperture, which can differ
from the defaults of individual scanout DARTs. Include the T8122 display
subsystem compatible so its shared aperture is checked by this binding.

Assisted-by: OpenAI Codex (gpt-6.1-sol)
Signed-off-by: DjDeveloperr <hey@djdev.me>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Domain allocation already lets a consumer specify apple,dma-range, but
of_xlate intersects the provider defaults before that override is read.
A consumer with a common scanout alias and DARTs with disjoint defaults
therefore fails configuration before its domain can be allocated.

Apply the same consumer aperture while parsing each specifier, retaining
validation of both explicit five-cell windows and the override. Share the
alignment, overflow and alias-width checks. Consumers without an override
keep their existing windows.

Add KUnit cases for the J613 high scanout alias across internal/external
DART defaults, independent low PIODMA, malformed overrides and invalid
five-cell specifiers. An ASAN/UBSAN fixture executing the production parser
and of_xlate reproduces the old rejection and accepts the common window.

Assisted-by: OpenAI Codex (gpt-6.1-sol)
Signed-off-by: DjDeveloperr <hey@djdev.me>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The display gate adds the external display DART to the shared display
subsystem. Its low PIODMA default does not overlap the internal display's
inherited 1 TiB alias, so their defaults cannot be intersected for scanout.

Describe the subsystem's common scanout aperture explicitly, matching the
internal DART. The external PIODMA consumer retains its existing low
aperture and the external processor still requires the firmware-ready
gate. This is a software-validated candidate; hardware external-display
qualification remains pending.

Assisted-by: OpenAI Codex (gpt-6.1-sol)
Signed-off-by: DjDeveloperr <hey@djdev.me>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J514S 14.7 boot chain can load a T6030 firmware build whose full TEXT
digest is not in the admission table. Probe refuses it and no GPU render
node is created.

Desktop use with the explicit prefix override reaches firmware READY and
reduces Hyprland CPU use from several cores to single-digit percentages.
Pin the complete measured digest only for J514S, with its segment sizes
and marker, rather than requiring a persistent bring-up override.

Exercise the production firmware table and exact lookup with the override
disabled. Reject other boards, altered digest suffixes, sizes and markers.

Link: omacom/linux-aurora#247
Signed-off-by: Nikita Konkov <95355711+javanoo6@users.noreply.github.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J514S cd05 FirmwareBuild row adds 15 lines to the T6030 firmware
table, which changes the pinned hw.rs file and t6030 module digests.
With that row removed both digests are their previous values, so the
T6030 profile itself is unchanged. Refresh the two pins and record why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Some 16-inch M3 Pro (J516S) units on the 14.7 boot chain load a B0 GPU
firmware image whose TEXT digest differs from the pinned J516S row:
TEXT 0x5c000, DATA 0x114000, GKTS marker 0x58e88 and TEXT sha256
cd05af6a828b52e4c2fed20086d3d18a7db42e03a8fd6f8354f9f06e0a61363e. The
build is refused with "loaded GFX TEXT identity mismatch", so there is
no render node and the compositor falls back to llvmpipe. The GPU only
starts with the g15_accept_text_prefix bring-up override.

Add this build as a J516S-only row. Rows still pin on the machine they
name; nothing changes on the J514S or on other machines. Extend the
maintained-handoff host test to check the new row and refresh the
zero-words golden pins for hw.rs and the T6030 module, which change by
exactly this one row.

Measured on a J516S (apple,j516s apple,t6030; os-fw 14.7, system-fw
15.5, iBoot2 iBoot-10151.140.19.700.2) with linux-aurora
7.2.11.aurora14-1 and the override: the admission line reports the
identical sizes, marker and digest, and the GPU reaches READY with
renderD128 present.

Link: omacom/linux-aurora#247
Link: omacom/omarchy#17739
Signed-off-by: joel cristobal <joelcristobal97@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Some 14-inch (J514S) and 16-inch (J516S) M3 Pro units on the 14.7 boot
chain load a third B0 GPU firmware image: TEXT 0x5c000, DATA 0x114000,
GKTS marker 0x58e88 and TEXT sha256
411833a7ded773feeac4a181552e3ff5582eaf4435f2dd8f620c1ed0b31df1b0. No
row pins it, so probe fails with "loaded GFX TEXT identity mismatch",
there is no render node and the compositor falls back to llvmpipe.

Three machines have reported it in issue omacom/linux-aurora#247, all on the 14.7 stub with
system firmware 26.6.2: a J514S and a J516S (both iBoot-10151.140.19.700.2,
mBoot-18000.161.10), which logged the identical sizes, marker and digest,
and a second 14-inch M3 Pro. With g15_accept_text_prefix=0x411833a7ded773fe
all three reached firmware READY with renderD128 present. The boot
chain matches the J514S cd05 reports, so the chain alone does not
select the image.

Add one row per board, J514S then J516S, so each pin still names the
machine it was measured on; nothing changes for other machines. Extend
the maintained-handoff host test: both boards pin to their own row with
the override disabled, other boards are refused, and an altered digest
suffix, TEXT or DATA size or marker is refused. Refresh the zero-words
golden pins for hw.rs and the T6030 module; with the two rows removed
both are their previous values.

Link: omacom/linux-aurora#247
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
Before the module's final activate() step, the G15 probe returned
-EPROBE_DEFER. That put the GPU on the driver core's deferred-probe list.
activate() then runs the real probe through driver_attach(), but if that
probe fails for good, for example because the firmware is rejected, the
driver core does not take the device off the list. It stays in
/sys/kernel/debug/devices_deferred until the deferred-probe work next
runs, so anything that waits on that list keeps waiting.

Return -ENODEV instead. activate() already reprobes every unbound device
once MODULE_READY is set, and a device added later sees it set, so
nothing needs the deferred list to retry. The display and PMP waits
inside the real probe still return -EPROBE_DEFER.

g15-probe-init-tests.py now checks that every probe before activation
returns -ENODEV, and adds a mutant that defers again.

Assisted-by: Claude:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>

(cherry picked from commit 6447458068e3 on omacom/linux-aurora, omacom/linux-aurora#470)
[7.3 base: the probe-init test also runs with the G16 registration here, so
 its pre-activation probe count follows the registration order; the new
 mutant is added to this base's expected-failure table.]
…e M3 runtime

The 7.2 rebase replaced the T8122 14.x branch of
apple_pmp_report_wait_supplier_ready() with a T6030-only one, so on an M3
MacBook Air every GPU power vote returns -ENODEV even with the PMP
running. With the new hidden APPLE_T8122_GPU_PMP_LINK, which
DRM_ASAHI_M3_T8122 selects (as DRM_ASAHI_G15 selects
APPLE_T6030_GPU_PMP_LINK), wait for the unique T8122 report's display
request (DISP, reg 7) to be ready and acknowledged before AGX, as on the
7.1.12 kernel the runtime was qualified with.

The PMP graph and supplier host tests copy the dispatch, so they copy the
T8122 wait too, built off there; their mutations still target the T6030
path.

Generated-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The supplier suite built apple_pmp_report_wait_t8122_14() only with
APPLE_T8122_GPU_PMP_LINK off, so every case returned at its first
check. Build it also as the M3 runtime does (T6030 and T8122 links on)
and run the T8122 graph: the unique, available report linked to this
PMP, with DISP (reg 7) acked, and its failures (machine, supplier and
report compatibles, a duplicate or disabled report, the apple,pmp shape
and identity, a missing, duplicate, disabled, incompatible or no-ack
DISP entry, the managed start and its readiness). With the link off, a
well-formed T8122 graph is refused.

Mutants cover the wait's config scope, compatibles, report checks,
readiness result and entry reference, and the dispatch's machine
scope in both directions.

Reported-by: Marcelo Alcantara <maralc@gmail.com>
Generated-by: LLM
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The 14" M3 MacBook Pro (J504) runs the same T8122 DCP image as the M3
MacBook Airs (90F849E1-..., named by the J504 ADT), so the 14.x IOMFB
path can drive its panel once the boot loader hands the display over.
Its panel is the J514S mini-LED panel: 3024x1964 with 74 notch rows,
at 60 or 120 Hz.

Add a J504 record with that geometry, ProMotion allowed, bring-up
logging on, and this image's colour matrix methods. The panel level
block is not qualified on this board, so brightness stays closed, and
its swaps keep zero timestamps as on the Airs. Other T8122 Macs (the
J433 and J434 iMacs) still have no record.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J504 (14" M3 MacBook Pro) loads the same 14.8.3 G15G firmware image
as the M3 MacBook Airs (UUID DF697F05-..., TEXT 0x64000, from its ADT).
Move the T8122 board list into t8122_admission as T8122_BOARDS, add the
J504, and test the exact list on the host. Firmware identity, resource
admission, the performance-state cap and the thermal limit are
unchanged; the J504 starts at the same conservative cap (state 2) as
the Airs. The J433 and J434 iMacs stay unlisted.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
Give the J504 DCP its panel node (the J514S 14" mini-LED panel: 302 x
196 mm, 189 mm below the notch, 500 nits) and point the boot
framebuffer at it, as on the J613, so simpledrm and the DCP driver use
the same physical size.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J504 runs the J613's DCP image, whose panel level block (brightness
in nits) is qualified on the J613. Mark the J504 record panel_nits and
admit the J504 machine for it, with the KUnit and host tests.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
On 7.3 the M3 MacBook Air runtime adopts the firmware's UAT through
Uat::new_adopted_with_user_upper(), which always asks for a
write-combined mapping of the handoff and TTBAT regions. On these Macs
the boot loader leaves both regions in the kernel's memory map as
reserved RAM, and memremap() refuses a write-combined mapping of RAM:

  memremap attempted on ram 0x00000103fff70000 size: 0x4000
  aurora 292400000.gpu: probe with driver aurora failed with error -12

On 7.2 the same helper chose the mapping per region: write-back for
reserved RAM, write-combined for a carveout. Uat::new_adopted() still
does that on 7.3.

Add Uat::new_adopted_ram_with_user_upper(), which makes the same
per-region choice and keeps the caller's choice of user upper half, and
use it for the M3 runtime. The M4 caller keeps the write-combined
constructor; no other backend calls either.

Seen on a J613 with a 7.3 kernel on the m1n1 1.6.1.aurora23 handoff.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
DRM_ASAHI_M3_T8122 depended on DRM_ASAHI_G15 only because the T8122
runtime adopts the firmware's UAT with the G15 backend's handoff
helpers (g15::uat::Window and g15::memory_mode). Turning the M3 Air on
therefore also turned the G15 backend on for M3 Pro/Max.

Split the adoption out behind a hidden DRM_ASAHI_UAT_ADOPTION, selected
by both options:
- without G15, g15/adopt.rs builds only g15/{uat,regs,hw}.rs (no probe,
  no driver registration); what in them needs G15's Config or ADT
  (adopt(), Window::new, Regs::identity and the T6030/T6031 tables) stays
  under G15;
- the RAM helpers memory_mode needs move from g15/glue.c to
  g15/uat_glue.c, so the runtime doesn't take glue.c's display helpers;
- M3_T8122 now states its own dependency on APPLE_PMP, whose PMP votes
  the runtime calls directly (before, it was implied by nothing);
- the mmu and pgtable items the runtime uses (the adopted
  Uat, with_tracked_status, read_user and point-of-coherency cleaning)
  are built with UAT_ADOPTION instead of G15.

G15 selects UAT_ADOPTION, so every configuration that builds today is
unchanged: off, G15 only and G15 with T8122 give the same warnings as
before, and M3_T8122 alone now builds without warnings. The asahi-g15
selftest reads the helpers from their new file, and the g15-zero-words
test pins the new hw.rs (its separate T6030 table pin is unchanged).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>

(ported from commit 9dff537 on omacom/linux-aurora)
[7.3 base: G15 keeps this base's "default y" and selects the new option. The
 base builds what the runtime shares with G15 under "G15 or G16" and keeps
 the point-of-coherency cleaning unconditional, so the mmu and pgtable gates
 become "UAT_ADOPTION or G16" and gain no new #[cfg] on clean_poc. The
 module is aurora.ko here. g15-zero-words-tests pins hw.rs after the test's
 own normalisation. Built with G15 and T8122 (same warnings as before) and
 with T8122 alone: that builds, and none of its dead-code warnings is in
 g15/, m3/, mmu.rs or pgtable.rs. Not run on hardware.]
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The DCP gives no EDID for a built-in panel, so on the 14.7 panel role
eDP-1 has an empty edid property and compositors see no make, model or
physical size.

Add a builder for a two-block EDID from the panel's device-tree node
and a table of the known panel models:
- the base block (EDID 1.4) names the panel by the PNP ID of the
  vendor prefix and the model of its most specific compatible
  ("apple,panel-j516" gives APP and the monitor name J516), gives its
  size, the model year (2023 for the J516), a nominal gamma of 2.2 and
  P3 primaries with a D65 white point (the panel is a P3 wide-colour
  panel, and the sRGB transfer function of Display P3 approximates a
  2.2 gamma);
- its first descriptor is a detailed timing, as EDID 1.4 requires,
  with the panel's geometry at 60 Hz: the same totals and horizontal
  porches as the panel's mode, the vertical front porch at 63 lines.
  The panel's own timing, 3456x2234 at 120 Hz, does not fit: the
  detailed timing's pixel clock field is 16 bits in 10 kHz units (at
  most 655.35 MHz) and the panel needs 3536 x 2456 x 120 =
  1,042,129,920 Hz; its 6-bit vertical front porch cannot hold the
  panel's 118 lines either;
- a DisplayID 2.0 extension carries the real 120 Hz timing as its
  preferred Type VII timing (1042130 kHz, the DCP mode line with the
  notch rows shown: 3456 3464 3496 3536 / 2234 2352 2360 2456), with
  the display parameters (size, native pixels, colour, gamma).
Neither block is a mode source: DRM modes still come from the DCP
firmware, and the update adds no mode. There is no product code,
serial number, luminance or range descriptor. edid-decode and
libdisplay-info both report the EDID conformant.

dcp_panel_edid_update() publishes the EDID on a connector. Add a
base_edid flag to the 14.x board records, set only in the J516C
record. On that board, read the make and product from the panel node's
first compatible at bind, and when a probe has modes and no other EDID,
publish the panel's EDID sized as the connector is
(dcp_update_connector_dimensions(): the firmware's size, else the
node's), then give the connector back its size in millimetres, which
the EDID update replaces with whole centimetres, and clear the
firmware-derived EDID flag. Displays with a firmware EDID, the J514C
(whose record carries J514S panel values) and the T6030 panels (J514S,
J516S) leave the flag clear and are unchanged. On the J516C the
connector keeps its one firmware mode, 3456x2160 at 120 Hz.

KUnit (apple-dcp-panel-edid): the EDID is valid to drm_edid_valid(),
drm_edid_get_product_id() and drm_edid_get_monitor_name() give APP, no
product code or serial and J516; the base block holds 35x22 cm, gamma
2.2, model year 2023, the P3/D65 chromaticity, the 60 Hz detailed
timing field by field and one extension; the DisplayID block holds its
header, display parameters and every Type VII field of the 120 Hz
timing, and both checksums; an update publishes 256 bytes and adds no
mode. The fixture's connector uses the atomic state helpers.
apple-dcp-v14-board checks that only the J516C record sets the flag
(J514C, T6030 and J613 do not).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
J514C has the same four-cluster T6031 GPU as J516C, but the existing
machine check refuses it before the shared display and firmware gates.
Add a default-off parameter requiring exactly 1 and both J514C/T6031
compatibles on the DeviceTree platform. Preserve display publication,
DT/ADT shape, hardware identity, core-mask and cold-start admission.

This is an experimental same-die bring-up. The maximum-power,
relative-power and two MTR mask groups remain J516C reference words;
they have not been independently measured on J514C. The opt-in warning
keeps this assumption visible. Do not claim thermal qualification.

The production admission harness covers the exact board/SoC/parameter
gates and native-display ordering, with compiled C and Rust mutants.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
The opted-in J514C rejects its loaded GFX TEXT because neither J516C
pin matches. Record the canonical digest measured by the normal driver
on the J514C/T6031 40-core target: OS boot-chain firmware 14.7, system
firmware 26.5.2. No private firmware image was extracted or published.

Pin the full canonical digest to J514C:

    669913fba2736e4b8f8a0f81eadc5ac00c9dc51fdd4c9d3770c66d2b0a1e8786

Require TEXT 0x64000, DATA 0x140000 and GKTS marker 0x5cf28 as well.
The eight entropy bytes after the single validated marker are zeroed by
the existing canonical hash path. No digest-prefix override is needed.

The original pre-review hardware cohort reached firmware READY on all
40 cores, displayed 3024x1964 at 120 Hz and passed short native GLES/Vulkan
pixel checks with no wrong pixels. A later normal installed boot also
passed automatic login with the separate local SDDM readiness fix.
These runs do not establish CTS, sustained-load or thermal qualification.

Link: omacom/linux-aurora#363
Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J514C lookup test assumes exactly three table rows and a fixed
J514C index. Another J516C firmware pin or table reordering breaks the
harness without changing the lookup implementation. Find the J514C row
by its board binding, derive the array size from the source and check
all J516C or unscoped rows. Retain exact digest/size/marker refusal.
Bind the current J516C rows explicitly so an opted-in J514C cannot use
a pin belonging to that board.

Log all four selected reference groups on the opted-in J514C path:
maximum power, relative powers and both MTR masks. The warning reads
the actual configured Reference. Do not derive a new cap from m1n1's
OPP powers: they are stand-ins and not measured J514C chassis limits.
The inherited values are still experimental and need native macOS
measurement before any general qualification claim.

Update the firmware label to reflect the earlier short native pixel
and normal-login result. This revision has host checks only; the live
target retains the previous hardware-tested package.

Production admission tests type-check and assert the logged reference
values. Exact lookup passes 14 tests both with reordered rows and with
PR340's proposed additional row; removing the J514C binding is caught.
The maintained handoff suite and 148 CI self-tests also pass.

Link: omacom/linux-aurora#363 (comment)
Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
A supported J514C boot must reach native graphics without an extra
kernel enable parameter. Admit its exact board and T6031 compatible on
the existing DeviceTree path and remove g15_j514c_bringup entirely.

Native display publication, the full board-scoped firmware digest,
segment shape, hardware identity/core masks, cold-start and record
checks still apply. T6034 and other boards do not inherit this path.
Keep the explicit diagnostic of the inherited reference power words;
automatic startup does not establish power/thermal qualification.

Run the production admission harness with no parameter model. Its
normal J514C path passes, wrong board/SoC/config and native display
failure controls refuse, and compiled mutants catch gate bypasses.
The exact firmware suite passes all 14 tests.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Remove the obsolete enable-parameter description from the T6031 hardware profile. J514C now follows normal board, firmware and hardware admission on boot; the inherited power and thermal qualification limits remain explicit.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Admit the exact J514C and T6031 pair in the native-display default selector, alongside J516C. An explicit display disable still wins. Keep all loader handoff, PMP and display publication checks before G15 firmware startup. Update the device-tree and wait diagnostics so they no longer describe an enable flag as required on J514C.

The production selector and request helper pass host tests for both supported boards, wrong SoCs and boards, and explicit owner choices. Mutants that remove J514C, drop the SoC check or lose the disable choice are rejected.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Reject any non-J514C firmware row that is not explicitly bound to J516C. Checking for only one correctly bound row allowed another unscoped J516C row to survive. Confirm that removing one of the two J516C bindings now fails the suite. Update the normal-boot J514C firmware name and reference-board comment.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Run the production display default selector and owner opt-out control in the normal host manifest so future edits cannot silently restore the manual enable requirement. Align the Kconfig help with normal J514C and J516C startup.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Add the distinct T6034 DCP, display-subsystem and PMP compatibles used by the J514M handoff. The DCP register layout has eight named regions, including the fifth display window, before its IOP VBAR region.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Give the measured J514M and T6034 pair a distinct native-display handoff, exact DCP image UUID and PMP namespace. Keep the checked inherited DART mappings, PMP image and power-state topology before enabling consumers. The native display starts by default only on that board and SoC pair; an explicit owner disable still keeps the framebuffer and GPU firmware off.

Publish and retain its component separately from T6031 so GPU startup cannot follow the wrong display. The IOMFB record requires both the J514M board and T6034 root compatible, and uses boot-framebuffer geometry while logging the first native timings. Unmeasured panel controls stay off.

Host checks run the production default/request helpers and board/image selection, including wrong boards and SoCs, unknown firmware, owner disable, and three failing mutants. Existing DCP panel and J514C default checks pass. Native hardware boot qualification is performed separately by the controller.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The 14-core M3 Max reports T6034, with four ten-slot G15C clusters and enabled masks yielding 8, 8, 7 and 7 cores. Add an exact J514M/T6034 OF profile, the measured identity pair and B1 silicon revision, and a six-element memory-cache IOMapping with repacked following VAs. Preserve the shared four-cluster command shape and explicitly warn about the inherited, unqualified J516C power reference words.

Propagate the SoC identity into the hardware record and require the separately published T6034 native display before admission. No enable parameter is needed. The firmware build list is intentionally empty until the normal kernel path measures the canonical loaded TEXT digest; empty profiles cannot use the generic prefix escape hatch and cannot start firmware.

Host validation compiles the actual profiles and firmware admission, checks record identity and six-channel mapping, and exercises display ordering and wrong board/SoC refusals with compiled mutants. Existing full T6031 firmware identities remain unchanged. Hardware startup and full ARM64 package validation remain for the coordinated lab run.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The fresh J514M ADT identifies the T6031-layout internal DCP, its display DARTs, and the checked PMP firmware, with a 400 MHz disp0 clock. Describe those resources only on J514M, behind distinct T6034 handoff and component compatibles. Keep all native display consumers disabled until the loader and kernel gates admit them.

The device tree preprocesses and compiles. Readback confirms the T6034 DCP, display subsystem and PMP compatibles, the measured 400 MHz clock, and the disabled DCP status.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
The selected powered-identity metadata reports core-mask-0 0x5fc7f5fd and
core-mask-1 0x7b. Splitting that value into four ten-slot clusters gives
[0x1fd, 0x1fd, 0x1fc, 0x1ed], with [8, 8, 7, 7] enabled cores. Correct the
profile comment and use those actual masks in the host fixture instead of
the same-count reference masks. The production profile still admits the
measured hardware IDs and geometry; it does not require an exact fuse mask.

The production-profile host harness passes with the corrected fixture.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
chriskearney and others added 19 commits November 18, 2026 03:33
The 1.60343 diagnostic on J514M reached native apple-drm publication and
reported one canonical loaded TEXT identity twice, then refused GPU
admission with EINVAL before firmware startup. Pin only that exact J514M
row: TEXT 0x64000, DATA 0x140000, GKTS 0x5cf28 and canonical SHA-256
4ca24b658f8ebe7c27375fdf38e41e5daf8632515077b537ca19e6d0dc7704b7.
The raw collector result remains FAILED because its unanchored accepted-
build regex also matched the unsupported-build refusal; the independently
reviewed log and source control flow establish the expected refusal.

Make the internal identity helper's prefix policy explicit. T6034 never
consults g15_accept_text_prefix, including with a nonempty build table;
older profiles keep their existing explicitly requested override behavior.
The exact board/SoC, measured hardware IDs, B1 revision, four-cluster/six-MCC
layout, normal defaults, owner opt-outs and display-before-GPU checks stay.
Inherited J516C power/reference words remain explicitly unqualified.

Compile the actual profile and production lookup against its public row,
rejecting every other board and each changed identity field. Exercise the
production identity helper with a nonempty strict table and verify that it
never reads a matching override prefix. Production admit() mutations catch
both enabling a T6034 prefix and changing the older profiles' policy.
All six related maintained host suites and manifest checks pass; checkpatch
reports no errors or warnings. No firmware images were read or exported.

This is a candidate for a bounded idle/single low-load native pixel probe,
not hardware or power/thermal qualification. R4's new frequency-reporting
warning remains unresolved; the DCP clock rate and timing are unchanged.
No additional hardware action or package build accompanies this commit.

Assisted-by: Codex:GPT-6
Signed-off-by: Scott Jones <scottajones@gmail.com>
Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Reuse the ADT-confirmed T6031 display layout on the J516M/T6034,
with its exact board/SoC and pinned 14.7 DCP image. Retain the
working T6031 handoff namespace separately from J514M and require
an explicit display owner choice.

Enable the existing swap timestamp behavior for the 120 Hz internal
panel and carry the J516M panel admission cases into the existing
host fixture. Other boards and their default policy are unchanged.

Assisted-by: Codex:GPT-6
Signed-off-by: Daniel Lemky <daniel@quantumfirelabs.com>
(cherry picked from commit 727efc7f628c9b1b406fce5338bb7b9498437cf3)
[Carried without the dcpext/HDMI admission (apple_t6034_display.dcpext,
 the dcpext and HDMI device-tree includes, and the fabric, crossbar and
 ATC tunnel matches), which depend on the unmerged omacom/linux-aurora#292.]
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
Share the existing six-channel T6034 G15C hardware layout while
keeping J516M machine and full firmware admission independent of
J514M. Require the measured 30-core fused identity 0x7b5ed7f5fd and
retain strict refusal of the generic firmware-prefix override.

Link J516M GPU startup to its T6031 display supplier; keep J514M on
its separate T6034 supplier. Extend the existing profile and display
order fixtures with the prior J516M admission cases. Inherited
J516C power/reference values remain thermally unqualified.

Assisted-by: Codex:GPT-6
Signed-off-by: Daniel Lemky <daniel@quantumfirelabs.com>
(cherry picked from commit 272cd802c034268f3f002151258ee8d1a054f3ef)
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J516M record already pins the J516C 14.7 image and J516 panel
geometry. Admit this board to the existing nits backlight path,
retaining the 500-nit bound, lifecycle and external-display exclusion.
No protocol, raw register or boot-brightness changes are required.

The original working kernel was physically qualified: apple-panel-bl
registers and the brightness keys visibly dim and brighten the panel.
The rebased branch has not been booted; suspend, DPMS cycles, the full
range and photometric accuracy remain unqualified.

Link: omacom/linux-aurora#259
Assisted-by: Codex:GPT-6
Signed-off-by: Daniel Lemky <daniel@quantumfirelabs.com>
(cherry picked from commit e9e02dc5e05725cfa1e5c9574e291a7937c8fe4e)
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J516M profile pinned the exact fused core mask of the first Mac it
was measured on (0x7b5ed7f5fd). That is fine while the GPU is opt-in,
but other 30-core J516Ms fuse off different cores and would be refused
once it is on by default. Require the G15C version and counts and
exactly 30 enabled cores instead, as Mesa does; start()'s per-cluster
plausibility check still applies. Log the identity on a refusal.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
…ormal boots

Give the J516M the J514M policy: the native display is on unless
apple_t6034_display.enable=0 is on the command line, and only on the
exact apple,j516m + apple,t6034 pair. Its external displays stay off:
the J516M profile hands over no dcpext.

The "not requested" message read the T6031 switch for every opt-in
SoC; read the T6034 one for the T6034 profiles.

Extend t6034-display-tests.py to the J516M: the default, the owner's
0 and 1, the exact root pair, its T6031-layout DCP record and pinned
image, with mutants for an unpinned SoC and an opt-in default.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J516M GPU profile adds a j516m module to hw.rs and a profile swap
to the G15 probe. g15-zero-words-tests.py pins hw.rs for its golden
T6030 profile and now skips that module line, as it does for t6034.
g15-probe-init-tests.py compiles probe() with stubs, which now need
Config.chip_id, hw::j516m::CONFIG, boot::glue::machine() and c_str!.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
The J516M panel record admits the T6031-layout DCP on apple,j516m with
apple,t6034, so v14_board_t6031_other_boards no longer holds: it
expected that pair to be refused.

Add a v14_board_j516m case, like the J516C and J514M ones: the record,
its J516C image, panel, nits and stamps, and that it is neither the
J516C nor the J514M record. Its name on a T6031 root is still refused.
The refusal case now uses another T6034 board and the J514M.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Scott Jones <scottajones@gmail.com>
…isplay gate rename

run-host-tests.py refuses to start while a tools/asahi/*-tests.* file is
missing from its table, and four carried tests were: the J514C display
default and firmware tests, the T6034 profile test and the T6034 display
test. Register them.

Two of them read drivers/soc/apple/t6030-display-gate.c, which is now
display-gate.c. The T6034 display test also compiles the display master's
probe path, which now calls dcp_t6041_ext_enabled() and
pm_vt_switch_required() and has match data its host build leaves unused;
give the harness stubs for the two calls and mark the data unused.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Two J516C MacBook Pro 16" M3 Max owners (issue omacom/linux-aurora#289) load a GPU
firmware whose TEXT digest is 125f0497c7904fde... (sha256
125f0497c7904fde87b05a9264a88cf03bdb3572a1715cec91bd0f9b78245544,
TEXT 0x64000, DATA 0x140000, marker 0x5cf28). The driver refuses it and
the Mac falls back to llvmpipe.

Add it as a third FirmwareBuild, written like the two existing J516C
entries and still gated to the J516C. The entry name and the comment
record where the digest was measured; they do not claim a distinct
firmware build.

Evidence from omacom/linux-aurora#289: with the digest accepted through
asahi.g15_accept_text_prefix, glxinfo reports Apple M3 Max (G15C B2),
and a GLES compute run shows 0 mismatches and no faults in dmesg.

This branch boots on a J516C M3 Max in the Mac lab (job
j1031-185713-2fe6, 3 of 3 tests pass, GPU probed). That Mac loads the
macOS 14.7 stub firmware, so the new digest itself was not exercised
there.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
(cherry picked from commit 5c1393df7e8c33f3e315647169c3ff02a4932589)
A 14-inch M3 Max J514C loads the same GPU firmware TEXT that the
previous commit admits on J516C: sha256
125f0497c7904fde87b05a9264a88cf03bdb3572a1715cec91bd0f9b78245544,
TEXT 0x64000, DATA 0x140000, marker 0x5cf28. Its boot chain reports OS
firmware 14.7, iBoot2 iBoot-10151.140.19.700.2 and system firmware
26.6.2 (omacom/omarchy-mac-pkgs#129). Without the digest the driver
refuses the firmware and the Mac falls back to llvmpipe. With it
accepted through asahi.g15_accept_text_prefix, the GPU came up in all 3
boots tried; in the first, glxinfo reports G15C B2 with OpenGL 4.6
accelerated and the kernel log shows no asahi-g15 errors. Idle only;
Vulkan and load were not run.

A row takes one machine, so add a second row for the same digest bound
to apple,j514c. The J516C row stays bound to apple,j516c; the digest
is not open to any other T6031 board. The board images come from the
Config, not from the row, so the row carries only the firmware identity.

The J514C host test counted exactly one J514C row and expected another
board to be refused a digest; with one digest bound to two boards, count
two rows and expect the first row bound to the asking board instead.

Not tested on hardware by this change: the new digest itself was not
exercised in the Mac lab, whose J514C loads the already admitted build.
Vulkan, sustained load and power and thermal qualification of J514C
remain open.

Assisted-by: Claude:claude-sonnet-5-5
Assisted-by: Claude:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
[scott: reworded message and row comment to the one verified J514C case]
Signed-off-by: Scott Jones <scottajones@gmail.com>
(cherry picked from commit 724a8dbb56d78d0ff44edc2da678c8ae85cf707a)
The J514M device tree describes its PMP report as
"apple,t6034-pmp-v2-report", "apple,t6020-pmp-v2-report", and
pmp-report.c matches the T6034 compatible, but the binding only allows
the T6031 form of that pair. CHECK_DTBS rejects t6034-j514m.dtb.

Accept the T6034 compatible in the same pair as the T6031 one.

Signed-off-by: Scott Jones <scottajones@gmail.com>
The J514C bring-up admission imported params for
params::j514c_bringup(). Normal J514C admission no longer calls it, so
the import is unused and rustc warns about it.

Signed-off-by: Scott Jones <scottajones@gmail.com>
Apple FPWM comes out of reset with ON_CYCLES and OFF_CYCLES both zero.
pwm-apple get_state reports that as period 0. leds-pwm, on
default-state = "keep", treats a zero period as a failed read, switches
to off, and applies duty 0.

On J313 the keyboard backlight is that device: fpwm1 channel 0,
pwms = <&fpwm1 0 40000>, default-state = "keep". Every boot logs

  leds_pwm led-controller: failed to read period for kbd_backlight, default to off

and probe programs a 0% waveform before systemd-backlight can restore
the saved level.

The period in the pwms cell is already in pwm->args by the time
led_pwm_add() runs. When the hardware period is 0 and that args period
is not, keep the args period for later brightness updates and do not
apply a duty of 0. Apply off only when there is still no period to use.

The fpwm1 suspend power-state failure is a separate bug and is not
touched here.

Signed-off-by: Lucas Goossen <lucas.goossen@hey.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
Firmware older than 26 answers create_backlight_service with
dcp_has_panel() only. That stays false until the panel dimensions have
been parsed, which is after 13.5 firmware asks during start_ios_gated.
The firmware then reports that it could not find the Backlight service,
and later backlight writes are ignored until a modeset power cycle.
connector_type is already eDP when the panel node has been read. Answer
an eDP connector on that path the same way firmware 26 and newer does.
External displays are not eDP and still answer false.

J313 BrightnessLCD rejects 395 nits and above: iDAC 1956 is accepted
and 1957 is not. apple,max-brightness is 420, so 100% asks for a level
the firmware drops. Cap apple,panel-j313, and a panel id of J313, at
394 nits. Other panels keep the device-tree maximum, and 100% on this
panel lands on 394.

Measured on a MacBook Air (M1, 2020, J313, DCP firmware 13.5) running
linux-aurora 7.2.11. This commit has not been booted as a new kernel.

Signed-off-by: Lucas Goossen <lucas.goossen@hey.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
DCP 13.5 reports brightness on the old 420-nit scale after the panel
is capped at 394, so actual_brightness read back as 420 and a write of
393 came back as 419. Clamp the stored nits, and the sysfs readback,
to the panel maximum.

On this machine the panel node is read before firmware starts, so
dcp_has_panel() is already true when the backlight service is created
and answering eDP as well does not change that return. The missing
service log and the need for a modeset before writes apply are
unchanged.

Not hardware-tested.

Signed-off-by: Lucas Goossen <lucas.goossen@hey.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
On a MacBook Air (M1, 2020, J313) with DCP 13.5 the boot loader leaves
the panel on.  The first dcp_poweron() then finds it enabled
(set_device_enabled 1 -> 1) and only sets a mode: the firmware does not
power up its video interface, assert HPD or load its LTM block, and logs
that it could not find the Backlight service.  Brightness swaps are
taken and the published level follows them, but the panel stays at the
boot level.  A DPMS off/on runs the firmware's full power-on sequence,
and every brightness change after it reaches the panel.

Give the J313 panel that cycle once, on DCP 13.5, when the boot loader
handed it over lit: an available simple-framebuffer whose "panel" points
at it.  The first power-on then cancels the swap watchdog, disconnects
the AV service and powers the pipe off, as dcp_poweroff() does for an
internal panel, before powering on.  The node outlives the handover, so
the cycle is marked done when it runs, and a later bind does not repeat
it; a bind that fails before the first power-on leaves it for the retry.
Other panels and firmware are unchanged.

Measured on a MacBook Air (M1, 2020, J313, DCP firmware 13.5) running
linux-aurora 7.2.11: brightness changes reach the panel straight after
boot, after s2idle suspend/resume, and after a boot with the lid closed,
where the boot loader still hands the panel over and the cycle completes
without timeouts.  Before, backlight writes had no visible effect until
one DPMS cycle.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Signed-off-by: Scott Jones <scottajones@gmail.com>
m1n1 hands the SIO firmware data to Linux and enables the SIO node only
when the device tree has an "sio" alias. Of the T8103 boards, only the
Mac mini (J274) has one. On the others the SIO stays disabled, so the
DisplayPort audio controller, which takes its DMA channel from the SIO,
never gets a sound card and DisplayPort over USB-C has no audio.

Move the alias to t8103-jxxx.dtsi, which all five boards include.

Signed-off-by: Eryk Wieliczko <eryk@wieliczko.ninja>
Signed-off-by: Scott Jones <scottajones@gmail.com>
tools/asahi/backlight-coldboot-tests.py compiles dcp_poweron() on its
own against host stubs. The J313 handover power cycle added calls there
(the swap watchdog, av_service_disconnect(), _dcp_poweroff()) that the
harness has no stubs for, so the test no longer compiled.

Move the cycle into dcp_cycle_handed_over_panel(), unchanged, and stub
that one helper in the harness. dcp_poweron() behaves as before.

Signed-off-by: Scott Jones <scottajones@gmail.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the J313 fixes. Keying the 394-nit cap and the handed-over power cycle off the panel's compatible (apple,panel-j313) is the right approach.

Because this is stacked on #2148, the diff also contains #2148's board-name gates (drivers/gpu/drm/apple/apple_drv.c:174-177, drivers/soc/apple/display-gate.c:222-238, drivers/pmdomain/apple/pmp-report.c:1279-1280, g15/glue.c:166). We select behaviour by a hardware or device-tree property rather than by the list of machines it was tested on, so those need to change in #2148 first (see the note there). Once that is resolved, nothing in the J313 commits stands in the way.

We don't have a J313. If anyone with one can post a boot row of this branch, that would close the evidence gap.

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.

10 participants