mirror of
https://github.com/lemonade-sdk/mac_linuxgpu.git
synced 2026-11-22 23:57:31 -10:00
User-client type 2 (MLG_USER_CLIENT_LINUX_FILE) is a Linux process of its own: LX_OPEN, LX_CLOSE, LX_IOCTL, LX_IOCTL_ASYNC, LX_RESULT, LX_MMAP, LX_MMAP_COMMIT and LX_MUNMAP (selectors 96-103, rt/lx_abi.h) run its system calls through lx_files on the client's own dispatch queue, so no call waits behind another client's. Request frames arrive as structure input or, above 4096 bytes, as a descriptor; replies go back the same way. Waits run on workers of the process and complete through AsyncCompletion with the reply inline when it fits. LX_MMAP memory types resolve in CopyClientMemoryForType to the buffer's page runs or to BAR sub-ranges (CPU-visible VRAM, doorbells). Ping, RuntimeBuild, QueryInfo and InitDevice hop to the owner's queue as observers' calls do; nothing else of the MacAMDGPU ABI is offered to this type, and types 0 and 1 are unchanged. The client joins the session at its first call, as a session client does. Its calls are admitted only while the upstream driver runs; a session close or quarantine closes the admission, waits for calls in flight, and makes every client process exit (waits return, files close through upstream postclose) before anything is removed. A client's Stop does the same for its own process on its queue, then leaves the session on the owner's queue. Observer selector 82 (DrmSelfTest, confirmed with "CSST") runs the CS self-test and returns its result; one test at a time. A test whose GPU work never completed keeps its process; a session close reaps it once idle or quarantines with compute uncertain. scripts/drm-selftest.py runs it on hardware.
6 lines
185 B
Bash
Executable File
6 lines
185 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# drm-selftest.py (the hardware CS self-test runner) against a fake selector.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
python3 -B linuxu/tests/test_drm_selftest.py
|