Skip to content

feat(fs5.5): add display connector activation proofs#61

Merged
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration
Mar 19, 2026
Merged

feat(fs5.5): add display connector activation proofs#61
adybag14-cyber merged 1 commit intomainfrom
fs55-ethernet-integration

Conversation

@adybag14-cyber
Copy link
Owner

@adybag14-cyber adybag14-cyber commented Mar 19, 2026

Summary by CodeRabbit

  • New Features

    • Added explicit display connector activation support—users can now request specific connectors via display-activate <connector> command.
    • System now validates connector activation requests and rejects mismatched connector selections.
  • Documentation

    • Updated hardware driver documentation and project checklists to reflect new connector-targeted display activation capabilities.

@adybag14-cyber adybag14-cyber merged commit 6c6240d into main Mar 19, 2026
14 of 15 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c50324ef-beab-4dc1-b835-82e9a4dd5305

📥 Commits

Reviewing files that changed from the base of the PR and between f5305f8 and 135ea20.

📒 Files selected for processing (9)
  • README.md
  • docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md
  • docs/zig-port/PHASE_CHECKLIST.md
  • docs/zig-port/PORT_PLAN.md
  • src/baremetal/display_output.zig
  • src/baremetal/tool_exec.zig
  • src/baremetal/tool_service.zig
  • src/baremetal/tool_service/codec.zig
  • src/baremetal_main.zig

📝 Walkthrough

Walkthrough

This PR adds explicit connector-targeted activation support to the virtio-gpu display system. It introduces new APIs for selecting and activating specific display connectors at runtime, extends the request parsing and service handling layers, and validates the activation behavior through enhanced display probe checks across multiple component layers.

Changes

Cohort / File(s) Summary
Documentation updates
README.md, docs/zig-port/FS5_5_HARDWARE_DRIVERS_SYSTEMS.md, docs/zig-port/PHASE_CHECKLIST.md, docs/zig-port/PORT_PLAN.md
Document new connector-targeted activation feature, including display-activate command, DISPLAYACTIVATE typed request, and validation of successful activation and rejection of mismatched connector requests.
Display connector selection
src/baremetal/display_output.zig
Added selectOutputConnector(connector_type: u8) bool function that iterates stored output entries to find and activate a matching connected connector, mutating global state accordingly. Includes unit test validating connector retargeting and non-existent connector rejection.
Tool execution layer
src/baremetal/tool_exec.zig
Added activateDisplayConnector(connector_type: u8) Error!void helper and new display-activate <connector> command dispatcher. Refactored runLaunchProfile to call activation logic for non-none connector types, with error-to-exit-code translation. Includes test verifying activation success and mismatch handling.
Request parsing and service handling
src/baremetal/tool_service/codec.zig, src/baremetal/tool_service.zig
Added display_activate operation to request enum and union, with framed request parser recognizing DISPLAYACTIVATE opcode. Implemented handleDisplayActivateRequest in service layer to parse connector name, invoke activation, and return formatted response with connector state or error.
Display probe validation
src/baremetal_main.zig
Extended runVirtioGpuDisplayProbe() with new error variants (ExplicitConnectorActivateMismatch, MissingConnectorMismatchFailure) and additional probe patterns: validates successful activation of expected connector and enforces rejection of deliberately incorrect connector requests.

Sequence Diagram

sequenceDiagram
    participant Client as Client/TCP
    participant Service as tool_service
    participant Codec as codec
    participant Exec as tool_exec
    participant Output as display_output

    Client->>Service: DISPLAYACTIVATE {connector}
    Service->>Codec: Parse framed request
    Codec->>Codec: Recognize DISPLAYACTIVATE opcode
    Codec-->>Service: Return operation.display_activate = connector_name
    Service->>Exec: activateDisplayConnector(connector_type)
    Exec->>Output: selectOutputConnector(connector_type)
    Output->>Output: Iterate entries for matching connected connector
    alt Connector found
        Output->>Output: Mutate state fields (scanout, resolution, etc.)
        Output-->>Exec: return true
        Exec-->>Service: Success
    else Connector not found
        Output-->>Exec: return false
        Exec-->>Service: DisplayConnectorMismatch error
    end
    Service->>Output: statePtr() to build response
    Service-->>Client: DISPLAYACTIVATE {connector} scanout=X current=WxH or ERR response
Loading

Possibly Related PRs

  • PR #26: Introduced the foundational virtio-gpu/EDID display surfaces that this PR builds upon, modifying the same display_output, tool_exec/service, and virtio-gpu probe layers.
  • PR #33: Previously touched display connector logic in src/baremetal/display_output.zig for EDID-based connector inference; this PR extends that file with connector-targeted selection and activation.

Poem

A rabbit hops through connector screens,
🐰 "Activate this display, I mean!"
Select the output, make it glow,
Parse each request, high and low—
Now every connector knows its show! 🖥️✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fs55-ethernet-integration
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

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