Repository navigation
arm64: dts: apple: t8132-j604: enable the internal DCP - #1179
Merged
Merged
Conversation
…ualified firmware The internal display DARTs at 0x30a300000 (disp0) and 0x30a340000 (DCP firmware) carry the running DCP's mappings. On the M4 firmware path the probe leaves them untouched until userspace opts in. On any other firmware it takes them as ordinary DARTs and resets them unless iBoot locked them, which cuts the DCP off from its own firmware. No tree reaches that today: the Airs are on the firmware path with any firmware, and the other M4 trees keep both DARTs disabled. The J604 tree is about to enable dcp_dart as the Airs do, and a J604 can boot an OS firmware other than 26.6.2, where nothing hands its display over. Refuse both DARTs on every M4 Mac off the qualified firmware, as their disabled nodes did. The Airs, and every M4 Mac on 26.6.2, are unchanged. Signed-off-by: Diljit Singh <hey@djdev.me>
dcp_m4_boot_framebuffer_check() accepts a boot framebuffer of the full panel height or 64 rows less, the Airs' notch. A boot loader hiding the notch cuts the framebuffer to 16:10, which on the J604's 3024x1964 panel is 3024x1890, 74 rows less. The J604 profile therefore refused its own boot framebuffer unless the loader kept the notch rows. Give each profile its notch rows (64 on the J713 and J715, 74 on the J604) and check against them. The Airs are unchanged. Signed-off-by: Diljit Singh <hey@djdev.me>
The J713/J715 file enables the internal DCP, its mailbox and firmware DART, names the PIODMA node with the disp0_piodma alias, and asks the boot loader to validate the inherited PIODMA and scanout streams (apple,j713-native-piodma and apple,j713-native-scanout). The loader then enables disp0_dart, piodma and the display subsystem. None of this is the Airs' own. The J604's 26.6.2 ADT has disp0, dcp, dart-dcp and dart-disp0 at the J713's addresses, with the same interrupts, power gates, stream IDs and remap tables, and the boot loader hands the DCP over on every M4 Mac with an internal panel on 26.6.2. Move it to t8132-laptop.dtsi, so the J604 gets it too. Each board still gives its panel's size: the J604's 3024x1964 panel at the ADT's 254.6 ppi is 302 x 196 mm. On 26.6.2 the M4 PMGR policy gives ps_disp_cpu to the firmware, so the DCP and its mailbox can probe. On other firmware that domain stays disabled and they do not, and the DART driver leaves dcp_dart alone. The J713, J715, J623, J624 and J773g dtbs are byte-identical. The J604 dtb gains the alias, status "okay" on dcp, dcp_mbox and dcp_dart, the two request properties and the panel size. Signed-off-by: Diljit Singh <hey@djdev.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables the internal DCP path in the J604 (MacBook Pro 14-inch, M4) tree the way the J713/J715 trees enable it, so the M4 DCP driver can adopt the J604 panel once aura#110 hands it over on 26.6.2. Two small driver fixes come first. Without them the J604 would refuse its own boot framebuffer, and on firmware other than 26.6.2 the generic DART probe could reset the live DCP firmware DART.
Commits
iommu/apple-dart: leave the M4 internal display DARTs alone off the qualified firmware. On the firmware path (
apple_t8132_firmware_path()),apple_dart_probe()keeps off 0x30a300000/0x30a340000. Off that path it would treat them as ordinary DARTs and runapple_dart_hw_reset()unless iBoot locked them. No tree hits this today, because only the Airs enabledcp_dartand they're always on the path. Once the J604 enablesdcp_dart, a J604 booted with any other OS firmware would. With this commit the probe refuses both DARTs on every M4 Mac off the qualified firmware, as the disabled nodes did before.drm/apple: m4: take the boot framebuffer's notch rows from the profile.
dcp_m4_boot_framebuffer_check()hard-coded the Airs' 64 notch rows. aura cuts the J604's 3024x1964 framebuffer to 16:10, which is 3024x1890 (74 rows), so the J604 profile from drm/apple: m4: adopt the J604 internal panel (preferred 120 Hz mode) #1178 refused it unlessasahi,show-notch=1. Each profile now carriesnotch_rows: 64 for J713/J715, 74 for J604.arm64: dts: apple: t8132-j604: enable the internal DCP. Moves the parts J713/J715 had in their family file into
t8132-laptop.dtsi:disp0_piodmaalias;status = "okay"ondcp_mbox,dcp_dartanddcp;apple,j713-native-piodmaandapple,j713-native-scanout, the requests aura#110 reads before it validates and enablesdisp0_dart, piodma and the display subsystem.The panel size stays per board. The J604's full 3024x1964 panel at the ADT's dot pitch (254.6 ppi) is 302 x 196 mm (
apple,panel-width-mm/-height-mmon&dcp, as on J713/J715).fb_panelkeeps describing the 3024x1890 below-notch framebuffer (302 x 189 mm), as on the Airs.J604 ADT check
I compared
/arm-io/disp0,dcp,dcp/iop-dcp-nub,dart-dcp,dart-disp0and its mappers between the J713 (26.5.1) ADT and the J604 26.6.2 and 27.0 ADTs. reg, interrupts, power and clock gates, compatible,sid,vm-size-*,remapandinstanceall match. Onlydart-id, the dot pitch and the color-accuracy index differ, and the DT uses none of them. So the J604 needs no address overrides.dtb diffs (VM kbuild, base f5fa539 vs head)
J713, J715, J623, J624 and J773g: byte-identical.
J604, under
dtc -I dtb -O dts -s:Warnings
alias_pathsfordisp0_piodma. J713 and J715 already have it. On J713/J715 only the "also defined at" line numbers move. J623/J624/J773g don't change.KeyError: 'uint8-array'on every T8132 dtb, so CI sees the same single line at base and head. I patched that crash locally and validated for real. J713, J715, J623, J624 and J773g are unchanged. The J604 gains one line:aliases: 'disp0_piodma' does not match any of the regexes. J713 and J715 already carry the same line. The underscore can't go: aura#110 (dt_set_j713_display_maps()) and the kernel (iomfb_m4.c,apple-dart-dcp.h) both look updisp0_piodmaby that name. The newly enableddcp,dcp_mboxanddcp_dartnodes validate clean.Tests
tools/testing/selftests/drivers/gpu/apple-dcp/run.py: 87/87.checkpatch.pl --strict: clean on all three commits.build kernel --profile asahi -- W=1 drivers/iommu/apple-dart.o drivers/gpu/drm/apple/: builds with no warnings, withCONFIG_APPLE_DART_J713_DCP=yandCONFIG_DRM_APPLE_DCP_T8132=y. A fullImage modulesdid not finish. The first run died on compiler segfaults in unrelated files (iwlwifi, emac, uniphier_thermal) while the shared VM's guest disk was 100% full, and a full asahi output (~9 GB) doesn't fit in what's left. I pruned only this branch's own output and built the objects the series changes.dtbs(asahi profile, VM): builds;W=1results below.m4-dart-boot-contract-test.pyandselftests/drivers/apple/bcm4377-radio-sids.pyfail the same way at base and head. Their source slices are stale (undeclaredj713_dcpext, and a missing} else if (!dart->lockedanchor). This series doesn't cause either failure.Not done here
J604
framebuffer0power domains. The J713/J715 file deletes the framebuffer'spower-domains, because the M4 PMGR policy disablesps_dptx_phy. Since M4: take the PMP, PMGR, display and GPU paths on the 26.6.2 firmware on every M4 Mac #1171 the J604 runs that policy on 26.6.2 too, so its simpledrm probably waits out the deferred-probe timeout there. I left it alone. Off 26.6.2 the policy doesn't run, and dropping the reference would let genpd turnps_dptx_phyoff as unused.DCP firmware UUID. aura only maps the J604's PIODMA if its DCP firmware UUID is the J713's (
81BAF476-...). drm/apple: m4: adopt the J604 internal panel (preferred 120 Hz mode) #1178 says the J604 runs the Airs' 26.6.2 image, but the J604 ADT dump here redacts the UUID, so I couldn't confirm it.iMacs (J623/J624). These still keep the DCP disabled. They need:
/arm-io/disp0has noexternalproperty and the DCP and DART addresses match;dcp_m4_profile: 4480x2520,notch_rows = 0,boot_stride = 17920if the stride is unpadded, plus the timing and brightness range;t8132-laptop.dtsi, plus the panel size, int8132-j623-j624.dtsi. It can't go int8132-desktop.dtsi, because the J773g's disp0 is external.The DART target-type list already admits J623/J624.
Request property names.
apple,j713-native-*now applies to every M4 laptop. Renaming it has to happen together with aura.🤖 Generated with Claude Code