Skip to content

fix(spdp): align wire format with compositor parser - #89

Merged
undivisible merged 1 commit into
mainfrom
fix/spdp-wire-format
Aug 20, 2026
Merged

fix(spdp): align wire format with compositor parser#89
undivisible merged 1 commit into
mainfrom
fix/spdp-wire-format

Conversation

@undivisible

Copy link
Copy Markdown
Contributor

Summary

  • Align protocol/display.in with the compositor's real 32-byte frames: four little-endian u64 words (obj_id, opcode, arg0, arg1), no argc.
  • Allocate the hoisted dsp-msg buffer in dsp-init so the first SPDP client does not write to address 0.
  • Point CI --entry at kernel-entry (the .in symbol) and gate the host-side wire-format check.

Test plan

  • bash scripts/check-spdp-protocol.sh — 34 passed, 0 failed
  • git diff --check
  • CI in compile + check-sci-contract.sh on this PR

Made with Cursor

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>
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@mergify

mergify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@undivisible
undivisible merged commit d8685fc into main Aug 20, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread protocol/display.in
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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