Repository navigation
display/dptx: don't reject a DPTX connect reply over the unk field - #292
scottjones wants to merge 1 commit into
Conversation
|
The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. The fix is shown on EPIC v1 firmware (OS firmware 13.5) on a J475c; please validate the DPTX connect on the J475c with the 27.2 stub. |
|
Two things before it can go in, in addition to the 27.2 validation already asked for: the commit needs ytgconsulting's own Signed-off-by (docs/licensing.md). The change itself reads well: matching Linux by logging an unexpected |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Thanks. The change is right. dptxport_connect() still checks the target (and the v2 status), and an unexpected unk is logged instead of being fatal, as Linux's dptxep.c already does. test_dptx_connect_reply.py compiles the real connect and validate functions, and it fails on main.
Ryan's 27.2 point is a hardware row, not a code change: the check no longer depends on the firmware. So the J475c connect on the 27.2 stub can come after the merge, with a revert ready.
What holds it is the sign-off you raised yourself. 3e914e4 is ytgconsulting's commit, and it carries only your forwarding Signed-off-by. It needs either their own sign-off or their OK here for you to add it. Once that's settled, I'll update the branch and merge when CI is green. The red format-check is base drift in src/sptm_virt_s2r.c, and main has been clean there since 11-20.
|
Blockers: 1. The author sign-off for ytgconsulting is already the open item, and the 27.2 J475c row is already requested. Not repeated. New:
Nit, src/dcp/dptx_port_ep.c:189-206: on EPIC v1 the reply's Checked: v2 behaviour is unchanged (it still sends 0x100 and an echo of 0x100 passes silently), the target mismatch still returns -1, dptxport_validate_connection() keeps its strict check, and the comment matches what Linux's dptxep.c does. The host test exercises the real functions. HW row: J475c on the 27.2 stub, this head: the connect reply line, HDMI up at boot with no hotplug, 0 failed units, 0 AVCs. Plus one J475d boot showing no new Assisted-by: LLM (Claude:Opus 5.5) |
On EPIC v1 firmware (seen on T6021 / J475c, OS firmware 13.5),
dptxport_connect() sends unk 0 and the DCP answers with unk 0:
DPTXPort: connect v2=0 sent target 0x8040 unk 0; ret 0
reply unk 0 target 0x8040 reserved 0 status 0
The connect succeeded, but aura required 0x100 and returned -1, so
display_configure() gave up before the modeset and the HDMI output
stayed black until a hotplug. The field echoes the request; Linux
(dptxep.c) only logs a mismatch. Accept an echo or 0x100 and only log
anything else.
Only dptxport_connect() changes; dptxport_validate_connection() always
sends 0x100 and keeps its check. Not needed on J475d (T6022), whose
reply already matched, but harmless there.
tests/python/test_dptx_connect_reply.py compiles the real connect and
validate functions against a stand-in service call.
Ported from omacom/m1n1 59530339 (omacom/m1n1#48)
Signed-off-by: Scott Jones <scottajones@gmail.com>
3e914e4 to
b1d3ac4
Compare
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: HOLD at b1d3ac4a7a23
Blockers:
- Commit
b1d3ac4a7a23(§4 /docs/licensing.md, prior blocker unfixed): authored byytgconsultingbut still carries only Scott Jones's forwardingSigned-off-by. Addytgconsulting's ownSigned-off-by(or record their explicit permission in this PR). - PR body (§4): delete the trailing attribution footer on the last line of the PR body (zero tool/AI attribution anywhere; do not replace it with an
Assisted-by:line). Commitb1d3ac4a7a23itself is clean of tool trailers. - PR body / evidence (§5): add
Tested:andRisk:lines and post hardware + regression rows at the exact head SHAb1d3ac4a7a23(J475c on the 27.2 / 26B123 stub showing the DPTX connect reply and HDMI up at boot without hotplug, with 0 SELinux denials, 0 failed units, 0 new kernel errors; plus a J475d regression row showing no newconnect reply unklog line).
Checked: interdiff3e914e48..b1d3ac4a7a23(identical code diff; commit tool trailers removed), DPTX connect/validate protocol (src/dcp/dptx_port_ep.c:153-208), §1–§6 of pre-PR checklist (§1/§2/§3/§6 pass; §4/§5 blocked), CI atb1d3ac4a7a23.
Evidence
- Interdiff (
3e914e48->b1d3ac4a7a23): zero code or test changes; removed tool trailers from the commit message. - Code check (
src/dcp/dptx_port_ep.c:178-208,tests/python/test_dptx_connect_reply.py):dptxport_connect()preservesresp.target != targetrejection and EPIC v2resp.statuserror handling, accepts echoedcmd.unkor0x100, and logs unexpectedresp.unkwithout aborting display setup (matching Linuxdptxep.c).dptxport_validate_connection()keeps its strict0x100check. Host test compiles and exercises both functions directly. - CI at
b1d3ac4a7a23: 14/17 passing (build,format-check,policy,selftest,readiness,pr-textwith 3 warnings forTested:/Risk:/body footer,ESP stage 2 vital size,stage1-sizegcc/fedora/alarm/nix,Pytestubuntu-latest+gcc/ubuntu-latest+llvm/ubuntu-24.04-arm); 3 queued (Pytest (macos-26 + llvm-brew),Pytest (macos-15 + llvm-brew),clang-macos). - Nit (non-blocking):
src/dcp/dptx_port_ep.c:193-205only checksresp.statuson EPIC v2; loggingresp.statuswhen non-zero on v1 (or in the mismatch log line) would preserve visibility if v1 firmware rejects a connect.
|
Two things are left from the reviews: ytgconsulting's own |
|
Thanks for working through the earlier review. GitHub now reports a conflict with main at b1d3ac4. If you are already preparing a push for the outstanding review items, could you merge main into your branch within 24 hours using a normal push? Otherwise a maintainer can handle the forward merge. The existing sign-off and J475c firmware 27.2 validation requests still apply. |
Sign-off: ytgconsulting, this is your commit from omacom/m1n1#48 and it has only my forwarding Signed-off-by. aura's docs/licensing.md asks for the author's. Could you add yours, or reply here that I may add it for you? Happy to close this if you'd rather open it yourself.
On EPIC v1 firmware (seen on a T6021 Mac Studio, J475c, OS firmware 13.5),
dptxport_connect()sends unk 0 and the DCP answers with unk 0:The connect worked, but aura required 0x100 and returned -1, so
display_configure()gave up before the modeset and HDMI stayed black until a hotplug. The field echoes the request, and Linux (dptxep.c) only logs a mismatch.Fix by ytgconsulting, from omacom/m1n1#48.
Evidence
tests/python/test_dptx_connect_reply.pycompiles the real connect and validate functions against a stand-in service call. It fails on main (test_connect_accepts_the_echoed_unk) and passes with this change.Merge Danger
Door: two-way.
Blast Radius: DPTX connect on desktop Macs.