Skip to content

drm/apple: T8140: run the macOS 27.2 DCP firmware as firmware 27 - #1809

Draft
RyanTheTide wants to merge 3 commits into
integration/aurorafrom
fw272/t8140-dcp-fw27
Draft

RyanTheTide wants to merge 3 commits into
integration/aurorafrom
fw272/t8140-dcp-fw27

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem. T8140's DCP is pinned to the H17P interface by its match data. On a 27.x stub that drives 27.x DCP firmware with the 26.x interface; on T8142 the same mix made 27.0 firmware panic after the first hotplug (121d6e9). T8142 also sent 27.3 and later through H17P.

Change. One firmware-27 rule for T8140 and T8142: a DCP reporting apple,firmware-compat 27 or later starts only when a complete method table exists for that build (dcp_check_firmware_27(), the same completeness check as T6050); otherwise it is not started. 26.x selection is unchanged. The internal T8140 DCP takes the default method profile, as T8142 does. The T8140 external DCP still admits only 26.6.2, so on 27.2 it stays off. On T8142 this means 27.0/27.2 are now table-checked, 27.3 runs as firmware 27, and 28+ is refused.

Testing. Host selftest apple-dcp/firmware-selection (built with -Werror): T8140 26.x -> H17P; 27.2.0 -> firmware 27; incomplete table, 27.0.0, 27.3.0 and 28.0.0 handled per the rule; dcpext, T8142 and T6050 cases unchanged. The new cases fail against the old code. Earlier: apple-dcp host selftests 89/89, dcp.o clean with W=1.

Still to run.

  • J700 on a 27.2 stub: internal modeset, DP-1 hotplug, one deep suspend/resume.
  • J813 on 27.0 and 27.2: modeset + hotplug unchanged (the T8142 path changed).
  • Follow-ups once a J700 runs 27.2: DT provider clocks for firmware 27, the external DCP on 27.2, backlight, blend CRC and sleep checks.

Before undrafting, rebase on the shared firmware-27 selection in #1832 (dcp_v27_admission()); this PR then shrinks to its T8140-specific lines.

Assisted-by: LLM (Claude:Opus 5.5)

RyanTheTide and others added 3 commits November 13, 2026 21:21
T8140's DCP is pinned to the H17P interface by its match data, so a
J700 booted from a 27.x stub would have its DCP firmware driven with the
26.x interface. On T8142 that makes the 27.0 firmware panic after the
first hotplug, and T8142 was moved to the T6050's firmware-27 instance
(121d6e9, "drm/apple: T8142: run the macOS 27.0 DCP firmware as
firmware 27").

Do the same for T8140 on 27.2, the one 27.x build it is going to run:
- firmware-compat 27.2.0 selects DCP_FIRMWARE_V_27_0 with the existing
  27.2 method table, checked for completeness as on T6050;
- the internal DCP takes the default method profile, as T8142 does;
- any other 27.x or later build on T8140 is refused instead of being
  driven through H17P. 26.x selection is unchanged.

The table check moves into dcp_check_firmware_27() so both callers share
it. The T8140 external DCP still admits only 26.6.2 firmware, so on 27.2
it stays off and the internal panel is unaffected.

A host selftest covers the selection for T8140, T8142 and T6050.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Resolve the dcp.c conflict: keep dcp_check_firmware_27() next to the
new dcp_ext26_admitted() and dcp_v27_sleep_transport_supported().
The firmware-selection selftest stubs dcp_ext26_admitted(), which
dcp_check_firmware_version() now calls.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
T8142 and T8140 each had their own firmware-27 block: T8142 took
27.0.0 and 27.2.0 without checking the method table and sent any other
27+ build through H17P; T8140 took only 27.2.0 and refused the rest.
Both SoCs ship on H17-generation DCP firmware and run the T6050
firmware-27 generation on macOS 27, so they share one rule: a
firmware-compat of 27 or later runs as firmware 27 through
dcp_check_firmware_27() (a known, complete method table for the build)
or is not started. No 27+ build reaches the H17P interface on either
SoC.

Changes: T8142 now checks the 27.0/27.2 table for completeness (both
are complete, as on T6050), drives 27.3 with its table instead of
H17P, and refuses 28+. T8140 also takes 27.0 and 27.3. The selftest
covers each case.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Early note on this draft (no full review yet):

  1. drivers/gpu/drm/apple/dcp.c:5845-5846 and :7100-7101: the firmware-27 rule and the default method profile are selected by of_device_is_compatible(..., "apple,t8142-dcp") || ... "apple,t8140-dcp", and every further SoC that ships on H17-generation firmware would need another compatible added in both places. Carry it in the match data instead: a field in struct apple_dcp_hw_data (set on the T8140 and T8142 rows) saying the block runs the firmware-27 interface when apple,firmware-compat is 27 or later and takes the default method profile there, and test that field in dcp_check_firmware_version() and dcp_platform_probe_pipe(). The selftest can then drive the field rather than compatible strings.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Closing: firmware-27 selection is keyed on two SoC compatibles; it should come back as a match-data field with a J700 row on a 27.2 stub.

@RyanTheTide RyanTheTide reopened this Nov 22, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Reopened and kept as a draft; the comment above lists what it still needs before review.

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