Skip to content

drm/apple: dcp: enable AFK init-prop name fallback on T6030 internal DCP - #3768

Closed
DjDeveloperr wants to merge 5 commits into
mainfrom
fix/t6030-dcp-afk-name-fallback
Closed

DjDeveloperr wants to merge 5 commits into
mainfrom
fix/t6030-dcp-afk-name-fallback

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What: Firmware 27.2 on the T6030 internal DCP can announce AFK infrastructure services without EPIC identity properties, leaving those services unbound. Let that hardware profile use the announced service name when the parser returns -ENOENT in the firmware-27 compatibility class.

Tested: At f35156ebd468, strict checkpatch and diff checks passed. The AFK and T6030 display host tests passed 11/11 and 3/3. The DCP host tests passed 48/48 with -Wno-unused-but-set-global for Clang 23. Warm AArch64 builds of afk.o and dcp.o on pc passed with Clang 23 and GCC 16, with zero warnings.

Risk: Two-way door. The driver change applies to the internal DCP on T6030 Macs (J514s and J516s) in the firmware-27 compatibility class.

Not yet: Draft pending J516s T357 hardware boot verification. Check that AFK services bind and that the internal panel modesets and its backlight works.

Test details

The host runner takes one --only filter per invocation. With unmodified Clang 23 flags, 18 DCP runs fail at fixture compilation because dcp-tunnel-prepare-tests.py sets the unused variable split_source_select_calls. The same failure reproduced on main at 19ee1b5bc9d5.

Each AArch64 dry run listed only drivers/gpu/drm/apple/afk.o and drivers/gpu/drm/apple/dcp.o. The GCC copy used CONFIG_GCC_PLUGINS=n.

Firmware 27.2 on the T6030 internal DCP announces infrastructure
services such as disp0-service without EPIC identity properties. AFK
rejects those announcements and leaves the services unbound.

Opt the apple,t6030-dcp hardware profile into the existing announced
name fallback for firmware interfaces in the 27.0 compatibility class.
Use the fallback only when the parsed properties lack EPIC identity.
Keep the J716c sleep transport exception scoped to md-manager.

Signed-off-by: DjDeveloperr <hey@djdev.me>
@DjDeveloperr DjDeveloperr added the blast:all Macs affected, from Merge risk (bot) label Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Hardware receipt (J516s / M3 Pro, T357 7d6d01c46376, direct LAN run direct-t357-01):

  • Cold boot and Cycle 01 deep sleep (89.06 s, firmware_resumes: 0 -> 1) recorded 0 internal DCP AFK failed to extract init props (-2) errors (down from 5 prior to this fix).
  • Keeping draft until the 2-cycle T357b run (with PMP __DATA SRAM restore) and CI checks complete.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (T6030, internal DCP firmware 27.2), direct-t357h-02, integrated kernel af2647f710fd: both same-boot deep-sleep wakes completed at 89.921 s and 88.309 s. The internal panel modeset to 3456×2160 at 120 Hz after each wake. Backlight stepped 25 → 75 → 25, with zero new priority 0–3 kernel records on either wake.

The second wake failed the RTC latch check. This run used the integrated stack; the current PR head still needs its hardware row and independent review.

Signed-off-by: Diljit Singh <hey@djdev.me>
Keep the parser error for an ill-formed EPIC dictionary. The T6030
announced-name fallback may recover from a missing identity, but it
must reject an invalid one. Model the new match flag in the host
fixture and cover a dictionary with a non-integer EPICUnit.

Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr
DjDeveloperr marked this pull request as ready for review December 1, 2026 17:06
@DjDeveloperr
DjDeveloperr requested review from a team as code owners December 1, 2026 17:06
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Local receipt at 6abf9f372c369b486dfd2e87945b0582f42970d3 on Linux main d148fbda6dca. Clang AArch64 built the AFK, DCP and parser objects.

@github-actions github-actions Bot added area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) and removed blast:all Macs affected, from Merge risk (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Merge readiness at a57f9738: not ready yet

Check Detail
CI at head ok 15 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at a57f9738
Conflicts ok none
PR text ok Risk: two-way · . The driver change applies to the internal DCP on T6030 Macs (J514s and J516s) in the firmware-27 compatibility class.
Hold no labelled hold by a maintainer

Areas: area:display, area:gpu

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J516s (T6030, M3 Pro) hardware qualification PASS for exact head 6abf9f372c369b486dfd2e87945b0582f42970d3 (qualified unchanged inside the integrated #3818 T6030 S2R candidate e9ce12c1c2381a20e24ea1ed3ebf19a02ae7f24f, run pr3818-qual-03, 7.3.0-t6030s2r #64, boot=e8c203da-da14-410c-9946-25636a7b8481):

  • 2 consecutive same-boot zero-flag production deep-sleep cycles: resumes 0 -> 1 -> 2 (90.06s + 59.31s, NUB.SPMI0.SW3, MBSE 0x10650, 0 suspend/resume priority 0–3 kernel errors, all 5 PMU scratch regions byte-identical to stock boot).
  • Scoped verification: DCP V27.2 / AFK sleep and wake (28ec00000.dcp: V27 wake plain-on 0@86 on cycle 1 and 0@85 on cycle 2; eDP-1 connected/enabled, backlight bounce 25 -> 61 -> 37, zero DCP errors).
  • Clean stock handback: verified back on stock 7.3.0 (boot=428632eb-f34e-427f-8014-cd7167d9cea1, both ESPs efab68fa..., empty grubenv, 0 failed units). Non-T6030 shared-driver peer hardware rows remain tracked separately before merge.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed needs-hw-row No hardware row at the PR head (bot) labels Dec 1, 2026
Add the afk_name_fallback field on apple_dcp_hw_data to the boot and edid
host fixtures so v27-panel-handoff and service-rebind compile and pass.

Signed-off-by: Diljit Singh <hey@djdev.me>
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Pushed test-only host-fixture fix a57f97381dc51ffd1f23ec85a2e88053c325f51e (tools/testing/selftests/drivers/gpu/apple-dcp/{boot,edid}.py: add afk_name_fallback to mock apple_dcp_hw_data / apple_dcp.hw). Verified apple-dcp/run.py --group boot (6/6, including v27-panel-handoff) and --group edid (4/4, including service-rebind) locally, checkpatch.pl --strict 0 errors/warnings/checks. Zero kernel/DT/module diff from 6abf9f372c36 (J516s pr3818-qual-03 2-cycle zero-flag deep-sleep PASS).

@github-actions github-actions Bot removed the ci-failing A check failed at the PR head (bot) label Dec 1, 2026
DjDeveloperr added a commit that referenced this pull request Dec 1, 2026
Signed-off-by: Diljit Singh <hey@djdev.me>

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HOLD at a57f97381dc5

The shared AFK parser now preserves a malformed identity error on every DCP. A second DCP generation needs a boot or resume on this change showing its existing services bind and the panel modesets.

Checks and evidence

I checked that only missing identity fields admit the announced-name fallback and malformed fields retain their parser error. The J516s two-wake receipt covers the runtime code. The last commit changes two host fixtures. The display KUnit group, Apple build and host checks passed.

@DjDeveloperr DjDeveloperr added the hold Held on purpose; skipped by the PR digest label Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J714s (M5 Pro, T6050) second-generation peer-control S2R row at exact unchanged head a57f97381dc51ffd1f23ec85a2e88053c325f51e: PASS.

Candidate: refs/aurora/m3-lead/shared-control-batch-20261202-v2 (59b414a7cbe3d97067e2b7c2d76359be8cc29af5 on main cf03d96bf209, all 13 PR heads included unchanged as merge parents).

  • Kernel: 7.3.0-m5-s2rbatch-59b414a7 (boot_id 158c330e-c583-4032-a79d-f092b07c7828, 16 SLC planes, SEP writes ENABLED, 0 GPU/MMU/DART/IOMMU/DCP/ISP/RTKit/BCM4377 faults).
  • Physical PMU RTC deep sleep/wake: rtcwake -d /dev/rtc1 -m mem -s 30 exited 0, suspend_stats 0 -> 1 (fail 0), firmware boot object resumes 0 -> 1 (AP 76 NUB.SPMI0Sw3IRQ / rtc), elapsed 30.492 s, same boot_id pre/post.
  • Handback: clean return to stock 7.3.0-m5-pr67 (boot_id 6c48d997-34de-4cbd-abe5-b8ecd12b4a7d, 13/13 slot+Stage2 hashes, 71/71 ICD hashes, pacman -Qkk mesa 0 altered).
  • Subsystem evidence: All 5 DCPs completed AFK discovery cleanly across boot and deep-sleep wake (DCPDPDevice, AppleDCPAgileCDIDPDisplay, DCPAVSimpleVideoInterface, panel AV: video interface 3 opened); identical 44 expected unmatched-service notices as #3807 baseline; 0 AFK/DCP errors.

@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Closing as superseded. The driver change, f35156e (AFK init-prop name fallback on T6030), landed on main through #3815 as 1ca91a1. The one piece left here, the afk_name_fallback field in the apple-dcp selftest fixture structs (a57f973), is covered by #3939. That PR updates boot.py and edid.py together with the other stubs #3815 needs, and the full host-test suite passes 952/952 with it. Nothing else in this branch is missing from main: the remaining drivers/base/power/main.c delta comes from the old main merge 6abf9f3.

Acelogic added a commit that referenced this pull request Dec 3, 2026
…T6031

Firmware 27.2 on the T6031 internal DCP announces AFK infrastructure
services on SYSTEM_ENDPOINT (ep:20) without EPIC identity properties,
matching T6030 (#3768). Enable afk_name_fallback on apple_dcp_hw_t6031
so those services bind by announced name under DCP_FIRMWARE_V_27_0.

Also set only_120hz_modes on apple_dcp_hw_t6031 and gate the
only_120hz_modes check in dcp_mode_settable() on DCP_FIRMWARE_V_27_0,
with a 14.7 non-regression check in parser_internal_v27_only_120hz.
Switching away from the 120 Hz boot timing crashes firmware 27.2 DCP
during ALPM/link teardown, while 14.7 fixed modes stay unaffected.

Signed-off-by: Acelogic <miguelc4600@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) hold Held on purpose; skipped by the PR digest needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant