fix(spdp): align wire format with compositor parser - #89
Conversation
The spec reserved an argc word dsp-run never reads, so a client following it would land surface_id in the wrong slot. Also allocate the hoisted 32-byte dsp-msg buffer and compile CI as kernel-entry. Co-authored-by: Cursor <cursoragent@cursor.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3bdd15c9-cbdf-40f1-b51a-ac1b1612ec45) |
|
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b64142674
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const SPDP-SURFACE-ATTACH = 1 // arg0: surface_id, arg1: buffer_id | ||
| const SPDP-SURFACE-DAMAGE = 2 // arg0: surface_id, arg1: x/w packed | ||
| const SPDP-SURFACE-ATTACH = 1 // arg0: surface_id, arg1: pool_id<<32 | offset | ||
| const SPDP-SURFACE-DAMAGE = 2 // arg0: surface_id, arg1: x<<48|y<<32|w<<16|h |
There was a problem hiding this comment.
Fix geometry field order in compositor records
For any surface where x != y or w != h, this newly specified packing is decoded by dsp-surface-geometry, but that function stores (w << 16) | h and (x << 16) | y, while dsp-composite reads the low halves as width and x. The resulting surface is rendered at (y, x) with dimensions (h, w). The added check misses the mismatch because it uses equal coordinates and square dimensions and only round-trips Python helpers; align the record storage/read order with this wire contract and cover asymmetric values.
Useful? React with 👍 / 👎.
Summary
protocol/display.inwith the compositor's real 32-byte frames: four little-endian u64 words (obj_id,opcode,arg0,arg1), noargc.dsp-msgbuffer indsp-initso the first SPDP client does not write to address 0.--entryatkernel-entry(the.insymbol) and gate the host-side wire-format check.Test plan
bash scripts/check-spdp-protocol.sh— 34 passed, 0 failedgit diff --checkin compile+check-sci-contract.shon this PRMade with Cursor