Files
mac_linuxgpu/linuxu
geramyloveless 22b50726b0 Owner calls carry up to 16 scalar outputs
An async session call's completion holds 16 words: a 4-word header and
at most 12 scalar outputs. host/owner_call.h asked for no more than 12,
and the driver's owner_call capped the selector's outputs at 12. A
selector that answers more refused the call: QueryInfo's compute
topology (tag 10, 16 words) returned kIOReturnBadArgument. The HSA
runtime then never learned the driver's queue slots, fell back to one
queue, and refused the next hsa_queue_create with
HSA_STATUS_ERROR_OUT_OF_RESOURCES before calling the driver. LemonSeed
Engine's hrx creates several queues, so on build 245 its GPU backend
never came up and it ran on the CPU. Build 242 called QueryInfo
synchronously, with 16 outputs.

A caller may now ask for up to 16 scalars (IOKit's limit). Up to 12 come
inline in the completion as before. When there are more, the completion
carries their count and none of them, and OWNER_RESULT returns them
(n * 8 bytes), followed by any structure output. host/owner_call.h,
which the HSA runtime, the host app and libmlg_drm build from, and
scripts/mlg_owner_call.py fetch them so. The Python twin's IOReturn
constants for kIOReturnNotAttached and kIOReturnIPCError are corrected,
and it reports kIOReturnNoSpace by its own value.

test-client-transports (test-lx-transport before) now also runs the HSA
runtime's own IOKit transport, its sources unchanged, against the dext's
extracted dispatch. The GPU's session answers are those the installed
245 driver gave the runtime on an R9700, and each handler refuses a call
that asks for fewer scalars than it answers, as the driver's do. From a
cold GPU the runtime brings the device up (HostWindow, InitDevice), opens
the compute session and creates three MULTI queues with an error
callback, as hrx does. Before this change the second hsa_queue_create
fails with 0x1008 (OUT_OF_RESOURCES) after one queue, as on the
hardware. The test also checks owner_call.h's shapes: 16 scalars, 14
with a structure output, and a caller asking for fewer than a selector
answers getting the driver's refusal. test-owner-call covers the
driver's side of 16 scalars through OWNER_RESULT.
2026-10-05 11:10:24 -07:00
..