Repository navigation
drm/asahi: g16: submit on the channels of the queue records' class - #3059
DjDeveloperr wants to merge 1 commit into
Conversation
Every G16 queue record declares scheduling class 2: +0x30 and +0x34 are 2, the +0x38 mask is 0xffff000000000000 and class_c is 2. Those are the words macOS 26B123 writes into its application queues' records on the J773g. Its WindowServer and system queues declare class 0 instead (0, 0, mask 0xffffffffffff0000, +0x40 = 1, class_c 1). The firmware has one submit channel per pipe for each class. In an HV trace of macOS 26B123 on the J773g, the RUNTIME descriptor of channel k names write cell 0x20 * (k % 3) + 8 * (k / 3), and every store to that cell is followed by doorbell k % 3 | (k / 3) << 2. macOS submits its class-2 queues on channels 6, 7 and 8 (doorbells 0x8, 0x9, 0xa), and only its class-0 queues on channels 0, 1 and 2. G16 submits its class-2 queues on channels 0, 1 and 2, the class-0 channels, a combination macOS never uses. Keep the pipe as Channel's identity and derive its ring and doorbell from the class the records declare, one named constant for both. The record kind stays the pipe, as in macOS's channel 6-8 records. All twelve channel pairs are already allocated and published at boot, so no initdata changes. The 26B123 ABI host test now compiles the production mapping and record image against the pairs and record words of that trace. Signed-off-by: Diljit Singh <hey@djdev.me>
|
Verdict at Blockers: none while it is a draft. Before it leaves draft it needs a row at its head (the A/B the PR describes). Checked: the diff: the ring and doorbell now follow the class the queue records declare, through one named constant, and the record kind stays the pipe; all twelve channel pairs are already published at boot, so no InitData change; the host test checks the mapping against our own HV trace of macOS 26B123; no Apple material; no gates; no new parameters; one commit with the author and Signed-off-by, no AI attribution. |
|
Recommend closing #3059. The J773g trace confirms that submissions move to the intended class-2 channels. The isolated change delivered no overall speedup. The two triangle-render rows that had improved on the integration kernel were both slower here. On the M4 mini (G16G B0, firmware
Both arms recorded 200 successful rows and the same two unsupported descriptor-buffer rows. Percentages use the benchmark’s primary metric and account for whether higher or lower is better. Individual workloads, channel receipts, and health
|
|
Closing based on the isolated J773g ( |
Stacked on #3057. It does not depend on the soft-fault PR.
What and why
Every G16 queue record declares scheduling class 2:
+0x30/+0x34= 2, mask0xffff000000000000,class_c= 2. These are the words macOS 26B123 writes into its application queues' records on the J773g; its WindowServer and system queues declare class 0.The firmware has one submit channel per pipe for each class. In our hypervisor trace of macOS 26B123 on the J773g:
0x20 * (k % 3) + 8 * (k / 3);k % 3 | (k / 3) << 2;0x8,0x9,0xa), and channels 0, 1 and 2 carry only class-0 queues.G16 submitted its class-2 queues on channels 0, 1 and 2. Now:
Channelstays the pipe;qinfo_row2::CLASS_VALUE);All twelve channel pairs were already allocated and published at boot, so InitData does not change. The stall dump's
ch0/ch1labels becometa_ch/fs_ch.Testing
Host.
test-abi-26b123.pynow compiles the production mapping and queue image against the trace's write-cell/doorbell pairs and its class-2 and class-0 record words.--strict: 0/0/0.git diff --checkis clean.Hardware (Mac mini M4, J773g, G16G B0, firmware 26B123), on our M4 integration tree carrying this commit.
Boot: context registration on channel 6 succeeds at boot.
Health: in about 4.0 M GPU jobs (Vulkan, ray tracing, OpenGL, the robustness subset) there was 0 GPU faults and 0 recoveries. The 16-process render row passed 3/3, and a deep sleep and resume passed.
Performance: same-machine A/B against the tree without it. The soft-fault advertisement was added in the same step, and the two are not separated.
render.lighttri d4render.lighttri, 2 processescompute.lightqueues d8sync.signalcross-queue d2mem.image1024It is a draft until an A/B of this change on its own decides whether it stays.