From 8ae24dce1a10798f6d74144959444f73e76776dc Mon Sep 17 00:00:00 2001 From: Diljit Singh Date: Sat, 7 Nov 2026 16:36:43 -0500 Subject: [PATCH 1/3] iommu/apple-dart: leave the M4 internal display DARTs alone off the qualified 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 --- drivers/iommu/apple-dart.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 4acc60c4875e2..8efb8f32ce0ff 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -4133,6 +4133,17 @@ static int apple_dart_probe(struct platform_device *pdev) of_machine_is_compatible("apple,t8132") && of_device_is_compatible(dev->of_node, "apple,t8132-dart") && res->start == 0x490000000ULL; + /* + * Off the qualified firmware nothing hands the internal display DARTs + * over, but the running DCP still uses them: never reset them. + */ + if (res && !tunneled && !apple_t8132_firmware_path() && + of_machine_is_compatible("apple,t8132") && + of_device_is_compatible(dev->of_node, "apple,t8132-dart") && + (res->start == 0x30a300000ULL || res->start == 0x30a340000ULL)) { + dev_info(dev, "Leaving inherited display DART untouched off the qualified firmware\n"); + return -ENODEV; + } if (j713_display && !IS_ENABLED(CONFIG_APPLE_DART_J713_DCP)) return dev_err_probe(dev, -EOPNOTSUPP, "retained J713 display requires CONFIG_APPLE_DART_J713_DCP=y\n"); From e65e76e412997896057032ef20d0d3b118489b75 Mon Sep 17 00:00:00 2001 From: Diljit Singh Date: Sat, 7 Nov 2026 16:36:43 -0500 Subject: [PATCH 2/3] drm/apple: m4: take the boot framebuffer's notch rows from the profile 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 --- drivers/gpu/drm/apple/dcp-m4-profile.h | 10 +++++++--- drivers/gpu/drm/apple/iomfb_m4.c | 5 ++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/apple/dcp-m4-profile.h b/drivers/gpu/drm/apple/dcp-m4-profile.h index 82485a3048b2e..88900add94724 100644 --- a/drivers/gpu/drm/apple/dcp-m4-profile.h +++ b/drivers/gpu/drm/apple/dcp-m4-profile.h @@ -9,6 +9,7 @@ struct dcp_m4_profile { const char *name; const char *machine; /* machine compatible */ u32 panel_width, panel_height; + u32 notch_rows; /* rows the boot loader may hide */ u32 boot_stride; /* D101: inherited framebuffer stride */ u32 swap_size; /* A407 input */ u32 swap_surface; /* plane-0 surface */ @@ -40,7 +41,8 @@ static const u32 dcp_m4_timing_j713[2][8] = { static const struct dcp_m4_profile dcp_m4_profile_j713 = { .name = "J713", .machine = "apple,j713", - .panel_width = 2560, .panel_height = 1664, .boot_stride = 10240, + .panel_width = 2560, .panel_height = 1664, .notch_rows = 64, + .boot_stride = 10240, .swap_size = 0x1bd8, .swap_surface = 0x588, .swap_dva = 0xe38, .swap_nullable = 0x1bcb, .swap_tail = 0x1bd6, .swap_nits = 0x35e, .swap_intent = 0x17c, @@ -60,7 +62,8 @@ static const u32 dcp_m4_timing_j715[2][8] = { /* The J715: the same firmware ABI with a 2880x1864 panel. */ static const struct dcp_m4_profile dcp_m4_profile_j715 = { .name = "J715", .machine = "apple,j715", - .panel_width = 2880, .panel_height = 1864, .boot_stride = 11520, + .panel_width = 2880, .panel_height = 1864, .notch_rows = 64, + .boot_stride = 11520, .swap_size = 0x1bd8, .swap_surface = 0x588, .swap_dva = 0xe38, .swap_nullable = 0x1bcb, .swap_tail = 0x1bd6, .swap_nits = 0x35e, .swap_intent = 0x17c, @@ -83,7 +86,8 @@ static const u32 dcp_m4_timing_j604[2][8] = { */ static const struct dcp_m4_profile dcp_m4_profile_j604 = { .name = "J604", .machine = "apple,j604", - .panel_width = 3024, .panel_height = 1964, .boot_stride = 12096, + .panel_width = 3024, .panel_height = 1964, .notch_rows = 74, + .boot_stride = 12096, .swap_size = 0x1bd8, .swap_surface = 0x588, .swap_dva = 0xe38, .swap_nullable = 0x1bcb, .swap_tail = 0x1bd6, .swap_nits = 0x35e, .swap_intent = 0x17c, diff --git a/drivers/gpu/drm/apple/iomfb_m4.c b/drivers/gpu/drm/apple/iomfb_m4.c index 2ffde863b8fac..53c7db440fa88 100644 --- a/drivers/gpu/drm/apple/iomfb_m4.c +++ b/drivers/gpu/drm/apple/iomfb_m4.c @@ -2270,17 +2270,16 @@ static int dcp_m4_boot_framebuffer_check(void) if (!of_device_is_available(np)) continue; found++; - /* The inherited console may exclude the notch (64 lines on J713). */ + /* The inherited console may exclude the panel's notch rows. */ if (of_property_read_u32(np, "width", &width) || of_property_read_u32(np, "height", &height) || of_property_read_u32(np, "stride", &stride) || width != dcp_m4_pf->panel_width || stride != dcp_m4_pf->boot_stride || (height != dcp_m4_pf->panel_height && - height != dcp_m4_pf->panel_height - 64)) { + height != dcp_m4_pf->panel_height - dcp_m4_pf->notch_rows)) { of_node_put(np); return -EINVAL; } - /* The inherited console can exclude the 64-line notch region. */ ret = 0; } return found > 1 ? -EINVAL : ret; From 720268090ea162792af83fcc9879eb537de5cd8a Mon Sep 17 00:00:00 2001 From: Diljit Singh Date: Sat, 7 Nov 2026 16:36:51 -0500 Subject: [PATCH 3/3] arm64: dts: apple: t8132-j604: enable the internal DCP 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 --- arch/arm64/boot/dts/apple/t8132-j604.dts | 6 +++++ .../arm64/boot/dts/apple/t8132-j713-j715.dtsi | 23 +------------------ arch/arm64/boot/dts/apple/t8132-laptop.dtsi | 20 ++++++++++++++++ 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/arch/arm64/boot/dts/apple/t8132-j604.dts b/arch/arm64/boot/dts/apple/t8132-j604.dts index b9d4c870e71cd..8c86b23bf92ef 100644 --- a/arch/arm64/boot/dts/apple/t8132-j604.dts +++ b/arch/arm64/boot/dts/apple/t8132-j604.dts @@ -74,6 +74,12 @@ }; }; +/* The full 3024x1964 panel including the notch rows, 254 ppi. */ +&dcp { + apple,panel-width-mm = <302>; + apple,panel-height-mm = <196>; +}; + &sound_jack { compatible = "apple,j604-macaudio-jack", "apple,macaudio"; model = "MacBook Pro J604 Jack"; diff --git a/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi index 1f54a7cfb0166..47c224586dffa 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi @@ -13,12 +13,6 @@ #include "t8132-j713-pmgr.dtsi" #include -/ { - aliases { - disp0_piodma = &disp0_piodma; - }; -}; - /* The J713 loader tree has these placeholders. */ &gpu_ttbs { reg = <0 0 0 0>; @@ -137,25 +131,10 @@ status = "okay"; }; -/* - * Internal display: the loader enables disp0_dart, piodma and the display - * subsystem once it has validated the inherited frontend mappings. - */ -&dcp_mbox { - status = "okay"; -}; - -&dcp_dart { - status = "okay"; -}; - +/* The J713's full 2560x1664 panel including the notch rows, 224 ppi. */ &dcp { - apple,j713-native-piodma; - apple,j713-native-scanout; - /* Full 2560x1664 panel including the notch rows, 224 ppi. */ apple,panel-width-mm = <290>; apple,panel-height-mm = <188>; - status = "okay"; }; /* External displays: both pipes, routed to either USB-C port. */ diff --git a/arch/arm64/boot/dts/apple/t8132-laptop.dtsi b/arch/arm64/boot/dts/apple/t8132-laptop.dtsi index e056ba40f5a28..cfb8d81d321b6 100644 --- a/arch/arm64/boot/dts/apple/t8132-laptop.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-laptop.dtsi @@ -19,6 +19,7 @@ aliases { keyboard = &keyboard; + disp0_piodma = &disp0_piodma; }; chosen { @@ -74,6 +75,25 @@ panel = <&fb_panel>; }; +/* + * Internal display: the loader enables disp0_dart, piodma and the display + * subsystem once it has validated the inherited frontend mappings. Each + * board gives its panel's physical size. + */ +&dcp_mbox { + status = "okay"; +}; + +&dcp_dart { + status = "okay"; +}; + +&dcp { + apple,j713-native-piodma; + apple,j713-native-scanout; + status = "okay"; +}; + &aop_audio { /* Microphones on LEAP; speakers and sense on TX0/RX0; the jack on TX2/RX2. */ dmas = <&admac0 1>, <&admac1 0>, <&admac1 1>, <&admac1 4>, <&admac1 5>;