Commit Graph

17 Commits

Author SHA1 Message Date
Geoffrey McRae
27a938e741 [client] input: send reports over LGMP
Use the LGMP input queue when the host advertises transport input,
while preserving SPICE fallback through the existing input abstraction.

Claim input lazily, publish ordered full-state keyboard and mouse
reports without blocking rendering, and keep the owner lease alive.
Reserve queue capacity for discrete transitions, coalesce only motion
under pressure, and release ownership safely during idle and disconnect.

Keep the Linux-to-HID map in the client and update LGMP to the
nonblocking data-send API required by the input worker.
2026-08-09 01:03:41 +10:00
Geoffrey McRae
f495e5b7ba [client] input: abstract guest input backends
Introduce LG_InputOps and route keyboard and mouse input through the
active video transport when it provides an input backend.

Keep SPICE as the fallback and force it while the SPICE display is
active. Add atomic shared/exclusive locking for safe backend changes.
2026-08-08 21:23:32 +10:00
Geoffrey McRae
0b744d2286 [common] kvmfr: report cadence hold and lead timing 2026-08-06 18:04:10 +10:00
Geoffrey McRae
1040683a3a [client] scheduler: serialize cadence controls
Keep one accepted frame-schedule control in flight until LGMP reports
that its serial has been consumed. Retain ambiguous tokens across pointer
queue recovery instead of retransmitting RESET or IMMEDIATE messages.

Back off acknowledgement polling and definite enqueue failures. Use modular
serial comparison so acknowledgement remains correct across rollover.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
515f4ba06f [client/host/idd/obs] scheduler: validate phase feedback
Bump KVMFR to version 28 and attach generation, epoch, and deadline
identities to cadence deliveries and their timing records.

Accept phase corrections only for the exact completed publication. Keep
VM and client clocks independent by exchanging relative phase errors.

Make submission, completion, and work-estimate accounting best effort
so scheduler state cannot delay GPU submission or frame publication.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
92f46f693f [client] lgmp: serialize stale pointer recovery
Clear timed-out pointer subscriptions under pointerLock so control sends
cannot race a cached queue handle becoming NULL.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
05f3b39b43 [client] egl: snapshot DMA frames before release
Copy imported IVSHMEM frames into renderer-owned textures before
acknowledging their LGMP messages. Hold each lease until its copy fence
signals, and protect selected snapshots until rendering completes.

Track independent delivery lanes, drain acknowledgements on the frame
thread, and recover stale queue subscriptions after host timeouts.
2026-08-06 18:02:08 +10:00
Geoffrey McRae
c7ed04412e [client/idd/obs] scheduler: isolate timing owner delivery 2026-08-05 15:45:30 +10:00
Geoffrey McRae
5626cfa55b [common] add frame scheduling protocol 2026-08-04 13:49:07 +10:00
Geoffrey McRae
fbe08d00ce [client] expose EGL stages in frame latency
Correlate received frames with the texture update actually consumed by
the renderer and retain damage until its token becomes renderable.

Split client latency into dispatch, import, queue, preparation, setup,
effects, desktop, composition, and swap stages in FRAME LATENCY.
Exclude diagnostic overlay work from composition and preserve client
wait time when producer timing is unavailable.

Publish joined samples through a bounded token queue, avoid sleeping
while producer timing is finalized, and correct Wayland photon units.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
24be0a8869 [host] measure ready time at framebuffer publication
Exclude command queue reset and cleanup from the ready stage, and keep
the wall-clock residual only as the legacy timing fallback.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
aa289fa022 [client/host/idd] correct frame timing attribution
Use calibrated copy-queue timestamps to separate source and effect
waits from the actual framebuffer copy.

Exclude producer readiness waits from client import timing so the
same interval is not counted in both Copy and Import.
2026-08-03 23:53:33 +10:00
Geoffrey McRae
7533c855c2 [client/host/idd/lgmp] add additional timing metrics 2026-08-03 23:53:33 +10:00
Geoffrey McRae
9417a71264 [client] lgmp: fix timeout due to improper handling of pause/resume 2026-07-31 12:57:09 +10:00
Geoffrey McRae
9657ac7aa2 [client] lgmp: dont validate the device if the transport is not selected 2026-07-30 15:14:29 +10:00
Geoffrey McRae
f2cc3f1959 [client] lgmp: set the old option names for easier migration by users 2026-07-30 07:45:58 +10:00
Geoffrey McRae
36b33033a1 [client] transport: introduce pluggable frame transports
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Move shared-memory ownership, LGMP session handling, queue access, and
DMA setup behind a transport interface. The LGMP backend preserves the
existing zero-copy frame and DMA paths while owning its lgmp:* options.

Expose the initialized EGL context through a versioned renderer interop
record for future accelerated decode backends. Add an LGMP-independent,
deterministic test transport for graphics-pipeline validation.
2026-07-29 13:36:49 +10:00