Skip to content

v0.3: viogpu3d: back RES_INFO blob windows with a synchronous host map

Pre-release
Pre-release

Choose a tag to compare

@osy osy released this 01 Sep 06:19
The RES_INFO placement escape handed back a window that was placed and
process-mapped but not yet host-backed: the MAP_BLOB reached the host
only when the UMD's follow-up DMA packet ran, and the UMD's only way to
learn that had happened was a full scheduler drain behind every DMA
packet already queued on the context (~12 ms under load, on every
mappable blob create).

Add CtrlQueue::ResourceMapBlobSync -- the ResourceUnmapBlobSync wait-ctx
pattern applied to MAP_BLOB, with the host response checked the way
CreateResourceBlob checks it -- and issue it from EscapeResourceInfo
once the blob is created and unmapped. RES_INFO now returns a window
that is placed, process-mapped, and host-backed in one answer, and
because the control queue is FIFO the acknowledgement also proves the
blob's CREATE_BLOB was processed, so a ring command may name the res_id
immediately with no ordering roundtrip.

A host that answers but refuses the map fails the escape with
STATUS_DEVICE_NOT_READY instead of handing out an unbacked window. The
blt-present path passes no mapping device: it only reads the descriptor
and must not establish a mapping the UMD never asked for.

Assisted-by: Claude:claude-fable-5