Repository navigation
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Blockers: 1. The change is correct. In drivers/gpu/drm/apple/dcp-peer-runtime-v27.inc:127-129,
HW row: J773g on this commit, default command line, 5 cold boots with the HDMI sink connected. Each needs no Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review against 23044cd5ecd4e0c20c75b3c0453c2ad57449cf16 (host-tests: SUCCESS).
Code Review
The kernel change itself (drivers/gpu/drm/apple/dcp-peer-runtime-v27.inc:127-133) is sound:
dcp->peer_reservedis protected bydcp_peer_lock(dcp-internal.h:462-464,dcp-peer-v27.inc:148-237), matching the existing read underdcp_peer_lockafterdevice_trylock(dcp->dev)at:137-140.dcp_peer_limited_pair_locked()(:84-94) already returnsfalsewhen!dcp->peer_reserved, so returning-EOPNOTSUPPearly for a peerless display skips no peer-limit logic and avoids takingdevice_trylock(dcp->dev)against DCP probe's lock.- Sole caller
iomfb_modeset()(iomfb_template.c:4297-4310) still rejects any timing requiring a pair viadcp_peer_needs_pair_v27()(:4305), and the paired path is unchanged.
Blockers
- §4 Attribution violation (hard):
- Commit
23044cd5ecd4e0c20c75b3c0453c2ad57449cf16includesAssisted-by: LLMin the commit message. Commits must carry human identity and humanSigned-off-by:only, with noAssisted-by:or AI trailers in commits. - Remove
Assisted-by:from the commit message and disclose agent assistance with a plainAssisted-by:line at the end of the PR body (currently missing).
- Commit
Checklist (§1–§6)
- §1–§3, §6: Pass (no chip/board/firmware gate added — checks runtime
dcp->peer_reservedstate; default cmdline, no hacks/params, no safety/naming violations). - §4 Attribution: FAIL (blocker #1 above).
- §5 Evidence: Incomplete — currently only 1 stacked J773g boot with the fix is reported, no Mac with a reserved peer (T6050) has been tested (
Not tested: any display with a peer (T6050), any other machine), and the §5 regression tuple (0 SELinux denials,0 failed units,0 new kernel errors) is missing. Please add multi-boot J773g confirmation (cold boots with HDMI sink connected, hot-plug/registration order, nopaired mode set failed, firmware mode set completed), a peer-path boot on T6050 confirming no regression, and the §5 regression counts on the updated head.
Assisted-by: LLM (Gemini 4 Neon)
|
Applies cleanly onto integration/aurora (4a17f73). dcp-peer-runtime-v27.inc has not changed since this was opened, so dcp_peer_modeset_v27() on the tip still tries the device lock before it looks for a peer, and the fix is still needed. Both reviews found the change correct; what is open is the commit-message point they raised and the rows: five J773g cold boots with the HDMI sink connected, and one boot on a machine that has a peer. |
dcp_peer_modeset_v27() takes the DCP's device lock with a trylock before it looks whether the display has a reserved peer at all, and returns -EBUSY when the lock is held. Without a peer the answer is -EOPNOTSUPP, "set the mode on this engine alone", and needs no lock. The lock is held by the DCP's own probe while the DRM device is bound and registered from it. A display that is already connected at that moment gets its first mode set from the fbdev client inside the registration, so under that lock: the mode set is refused before anything is sent to the firmware, apple-dcp 30ae00000.dcp: paired mode set failed: -16 while the requested mode is already recorded as the current one. The pipe then runs on whatever mode the boot loader left until the next real mode change. Whether it happens depends on the order of the sink's hot-plug and the registration, a few milliseconds apart on the J773g's fixed HDMI output on firmware 27.2: four boots had the hot-plug after the registration, one had it 0.3 ms before and logged the line twice, with no mode set reaching the firmware until a mode change 95 s later. Answer for a display without a reserved peer under the peer lock alone, before the device lock is tried. A display with a peer is handled as before. A display with a reserved peer still gets -EBUSY while its device lock is held, with the mode already recorded; that is unchanged. Every firmware 27 display without a peer takes the new return. Not tested: any display with a peer. Signed-off-by: Sean Dolbec <sdolbec1@gmail.com>
23044cd to
7ba8b93
Compare
|
We can schedule the five connected-HDMI J773g cold boots locally. Could an owner with a peer-equipped J575c/T6050 claim the paired-display boot at |
What fails
dcp_peer_modeset_v27()tries the DCP's device lock before it looks whether the display has a reserved peer, and returns -EBUSY when the lock is held. Without a peer the function has nothing to do: its answer is -EOPNOTSUPP, "set the mode on this engine alone".The DCP's own probe holds that lock while the DRM device is bound and registered. If the sink's hot-plug arrives before the registration, the fbdev client's first mode set runs inside the registration, under the probe's lock, and is refused before anything is sent to the firmware:
The requested mode is already recorded as the current one at that point, so nothing retries it, and the pipe stays on the boot loader's mode until the next real mode change.
The change
Seven lines: under
dcp_peer_lock, a display with no reserved peer gets -EOPNOTSUPP before the device lock is tried.Who it reaches
The only caller is
iomfb_template.c:4297: every firmware 27.0+ mode set that does not inherit the boot mode. Every such display without a peer takes the new return; it is the value the old code returned whenever its trylock succeeded. A display with a reserved peer is unchanged line for line, and that includes the remaining window: it still gets -EBUSY while its device lock is held, with the mode already recorded.Testing
Hardware: a J773g (Mac mini M4) on a macOS 27.2 stub, as part of our firmware-27 display test stack (not on the base alone, where this unit has no display path).
paired mode set failedline, and the firmware'sModeset requestedat 1.49 s.Not tested: any display with a peer (T6050), any other machine.
Checks, on base 6ae9c3c and on the commit:
host-testsjob's command (python3 -I tools/asahi/run-host-tests.py, clang 18, rustc 1.96.0; gcc 15.2 where the job pins 13), run locally: 426 of 427 on both. The one failure on each is a mutant run oftbnet-refill-tests(Thunderbolt networking), which is timing-dependent on this shared host: run again by itself, all five of its runs pass on the commit, and on the base three of five failed while another job was running. Everything else passes on both, the apple-dcp suite included.--strict: no errors, warnings or checks.W=1build ofdrivers/gpu/drm/apple/: builds; the two kernel-doc notices it prints are fordcp.c:774, which this commit does not touch.The commit adds no board, SoC or firmware gate. Its one new test is whether a peer engine is reserved for the display, the state the function already reads a few lines further down.
On integration base
5746ef8a5, the rebased patch compiled for ARM64 with Rust enabled. Bothdcp.oandiomfb_v27.obuilt without warnings. The five connected-HDMI J773g cold boots and the J575c/T6050 peer boot are still pending.Assisted-by: LLM (OpenAI:GPT-6.2-Astra)