Skip to content

drm/apple: iomfb_v14_7: select the board record by the panel node, not the machine - #2360

Draft
RyanTheTide wants to merge 1 commit into
mainfrom
hack/drm-board-gates-c
Draft

RyanTheTide wants to merge 1 commit into
mainfrom
hack/drm-board-gates-c

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Problem

drivers/gpu/drm/apple/iomfb_v14_7.c picked the 14.x internal-panel board record by the DCP compatible plus the machine compatible (apple,j613, apple,j615, apple,j516c, apple,j514c, around line 1654). It then admitted the panel level block only on a machine list (dcp_v14_panel_nits_admit(): j514s, j516s, j516c, j613, around line 1696), on top of the record's own panel_nits flag. A record holds panel and firmware data: the native panel size, 120 Hz, the level block in the swap, and the DCP image whose layouts were checked. The board device trees already name the panel. Every one of these boards has a panel node under its DCP with apple,panel-j613, apple,panel-j615, apple,panel-j516 or apple,panel-j514.

Change

A record is now selected by the DCP compatible and the compatible of the DCP's panel child. The level block follows the record's panel_nits flag. No DT change is needed.

Every SoC it reaches:

  • T6030 (J514s/J516s), T8122 (J613/J615) and T6031 (J514c/J516c) get the same record as before. panel_nits is set on exactly the records the machine list allowed (T6030, J613, J516C), so the level block is unchanged.
  • T6034 (J514m/J516m) is the one real difference. These machines use apple,t6031-dcp with the J514/J516 panels, so they now get the T6031 record for their panel instead of "no board record". They still start only if the DCP image is the one the record names (apple,firmware-uuid) and the loader set the handoff marker. Otherwise the boot framebuffer stays, as before.
  • T8112, T6000 and every other SoC are not 14.x internal DCPs and are not touched.

Testing

  • arm64 LLVM build with W=1 of iomfb_v14_7.o (which includes the backlight KUnit file) and v14-board-test.o: no new warnings.
  • tools/asahi/dcp14-panel-tests.py passes. It now gives panel nodes, and it covers J514m/J516m getting the T6031 records, an unknown panel and a missing panel node being refused, and the J615/J613/T6030/J516C/J514C cases as before.
  • The KUnit cases apple-dcp-v14-board and v14_bl_boards were rewritten for panel compatibles. They have not been run under kunit.py (that needs a booted arm64 kernel). Their logic was run in a host harness that compiles the production records, dcp_v14_board_select() and the test bodies with a KUnit shim: all cases pass.

Still to run

  • J613, J516c, J514c or J514s/J516s (community owners): the internal panel starts as before. dmesg | grep -i 'display not started' is empty, the debugfs status file has the same name (dcp-j613, dcp-j516c, ...), and brightness changes still reach the panel on J613/J516C/T6030.
  • J514m/J516m (community, optional): either the panel starts with the T6031 record, or dmesg says the DCP firmware image is not supported and the boot framebuffer stays.
  • No lab Mac reaches this code (Neo, J616s, M1 Pro and M2 are not 14.x internal-panel DCPs).
Hardware rows (combined test kernel, 2026-11-20)

This change was booted in a combined test kernel: integration/aurora 0abc2f3 plus the open gate-sweep drafts plus this and the related drafts (7.3.0-aurora-hk2/pwr1/hk3). It ran once on each lab Mac (M1 Pro J316s, M2 J413, J616s, Neo J700) and was compared against the production kernel on the same Mac, using the same silent row script:

  • kernel errors, failed units and SELinux denials;
  • microphone capture byte counts;
  • camera frame counts;
  • USB speeds;
  • panel brightness steps;
  • every retry/refusal message these drafts touch;
  • 2 s2idle cycles on M1 Pro, M2 and J616s.

M1 Pro, M2 and J616s matched production on every row, apart from the new counters and lines the drafts add. The Neo row found the old-DTB display regression that #2358's follow-up commit fixes.

This PR: No lab Mac reaches the v14_7 board records; boot-clean regression rows only.

…t the machine

The 14.x internal-panel records were picked by the DCP compatible and
the machine compatible (apple,j613, apple,j615, apple,j516c,
apple,j514c), and the panel level block was admitted only on a machine
list (j514s, j516s, j516c, j613) on top of the record's own panel_nits
flag.

What a record holds is panel and firmware data: the native panel size,
the 120 Hz timing, the level block in the swap, and the DCP image the
layouts were checked against. The device trees already name the panel:
every one of these boards has a panel node under the DCP with
apple,panel-j613, apple,panel-j615, apple,panel-j516 or
apple,panel-j514. Select a record by the DCP compatible and that panel
compatible, and take the level block from the record's panel_nits.

For the boards in the list nothing changes: every record still matches
its board, and panel_nits is set on exactly the records the machine list
allowed (T6030, J613, J516C). A T6034 J514M or J516M, whose DCP is an
apple,t6031-dcp with the J514 or J516 panel, now gets the T6031 record
for its panel instead of "no board record"; it still starts only if its
DCP image is the one the record names and the loader set the handoff
marker, so an unchecked image keeps the boot framebuffer.

The KUnit cases and the host panel test now give panel compatibles.

Fixes: 5b906e1 ("drm/apple: drive the J613 (M3 Air 13") internal display from a board record")
Fixes: 279f5f6 ("drm/apple: port the scoped T6030 14.7 panel backlight")
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Looks good; approve once one existing-board row and one J514m/J516m row have run.

Selecting by the DCP's panel child replaces a machine list with what the DT already says about the hardware. I checked every board against the new records:

  • panel sits directly under &dcp with the expected first compatible on J514s/J516s, J514c/J516c, J613 and J615 (t6030-j514s.dts:81, t6031-j514c.dts:36, t8122-j613.dts:324, t8122-j615.dts:22, ...).
  • So dcp_v14_board_select() (drivers/gpu/drm/apple/iomfb_v14_7.c:1644-1662) returns the same record each of these boards got before.
  • The T6030 record has no panel, so it matches any T6030 DCP, as it did with no machine.
  • panel_nits is set on exactly the T6030, J613 and J516C records, the set the removed admission list allowed, so the level block is unchanged on all of them.
  • dcp_v14_panel_is() (:1675-1681) drops its node reference and fails closed with no panel child.
  • The commit carries only a human Signed-off-by.
  1. The one behaviour change is on a Mac nobody has run: T6034 J514m/J516m (t6034-j514m.dts:36, t6034-j516m.dts:36) now take the J514C/J516C records. Before, they stopped at "no board record". They still need DCP_V14_J516C_FIRMWARE_UUID (:56) and apple,t6031-handoff (:162, :190). If the T6034 DCP image turns out to be the T6031 one, the J516m starts the internal panel with the J516C record's 120 Hz timing, its display clock (unconfirmed even on T6031, :152) and panel_nits. That is the right outcome only if it works, and nothing has shown that it does.

  2. Nit: on a J514m/J516m the log and debugfs name will read J514C/dcp-j514c (:185-186) or J516C/dcp-j516c (:157-158). Now that records follow the panel, name them by DCP and panel (for example T6031 J516 panel/dcp-t6031-j516) so a report from a J516m doesn't look like a J516c.

HW row: on this head, both with 0 AVC, 0 failed units and no new kernel errors.

  • J613 or J516c (community owner): the internal panel starts, no display not started line, the same debugfs status file as before, and 3 brightness steps reach the panel.
  • J514m or J516m: either the panel starts and 3 brightness steps reach it, or one display not started: DCP firmware ... is not supported line with the boot framebuffer kept, and nothing in between.

Assisted-by: LLM (Claude:Opus 5.5)

This branch has not been deployed

No deployments
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.

1 participant