Repository navigation
A8 GPU: one PM id per VM, and bind without exp_hw_support - #231
Conversation
gpu/0075. Each A8 VM's geometry and fragment jobs name the PM id of its slot (slot - 1, 0..6) instead of 0, as Apple's assignPMId gives each live parameter manager its own id. The firmware loads a set's free list only when a job names an id other than the one last loaded, and on a switch saves the running set back to its control block. With one id for every VM, a second client's TA ran on the first client's free-list state: TE control-stream faults (tag 11, catalogue 9), device lost and PM hangs with two clients on the GPU, which the GPU desktop always has. Only powervr.ko changes on apple-4k. Assisted-by: LLM
gpu/0076. The A8's GPU (BVNC 3.10.4.5) is not in the driver's support list on main, so it binds only with powervr.exp_hw_support=1, which no A8 board's boot entry sets: an installed system's desktop never finds the GPU. Add it next to the A9 and A10, as the flown A8 kernels have it. The login's GPU probe still falls back to the software desktop if it does not draw. The series applies on n102, n61, n56, j96 and j97. Assisted-by: LLM
# Conflicts: # CHANGELOG.md
|
Merged, thanks Berkay! Both patches landed as they were: every A8 board (iPod touch 6, iPhone 6 and 6 Plus, iPad mini 4) now finds the GPU on an installed system without On top I only added a CHANGELOG entry and merged main into the branch for a CHANGELOG conflict. Nothing in your code changed, so no retest is needed for this. Your original head is tagged One small thing: the two patch files have no The iPhone 6 and iPad mini 4 desktop runs you mentioned would be great to see once this is in a build. |
|
Signed-off-by: Berkay Kösebay brkosebay@users.noreply.github.com This covers |
He gave it for every patch of his on main that lacked one: #231 (comment) 162 kernel patches and one m1n1 patch; trailers only.
|
Thanks @brkosebay! Your sign-off is now on all 163 of your patches on main (162 kernel, 1 m1n1), each linked to your comment: d703fcf. |
Follow-up to #196, so that the A8 boards (iPod touch 6, iPhone 6 and 6 Plus, iPad mini 4) can run the desktop on the GPU. Two patches:
exp_hw_support=1, which no A8 boot entry sets. An installed system's desktop never finds the GPU. This adds it next to the A9 and A10, as the kernels flown on the A8 have it. The login's GPU probe still falls back to the software desktop if the GPU doesn't draw.The PM-id bug
Every A8 geometry and fragment job named PM id 0, each with its own VM's PM control block. The firmware loads a set's free list into the PM only when a job names an id other than the one that PM side last loaded (the check returns early at firmware
0x1000802c, in0x10007fd8). With one id for every VM, one VM's TA could run on the free-list top index and saved PM registers that another VM had left loaded.Seen on the device as, with a second client running next to the compositor:
VK_ERROR_DEVICE_LOSTin the client;What Apple does
The kext gives each live parameter manager an id of its own:
assignPMId(0xfffffff008486614in the iOS 12.4 iPod touch 6 kernelcache, 16G77) keeps the id in the PM object, pops a free id from a LIFO of 127 (0..126) for a PM that has none, and only steals the least recently used id of a PM whose work has retired. TA submit writes the id into both the TA and the 3D command. Its release (0x84804f0) puts the id back on the free stack and sends the firmware nothing.When a job names a different id, the firmware saves the running set back into its own control block (
0x100252cc) and loads the next one (0x10025a28), so each VM's TA runs on its own free list.The fix
A8 jobs name the PM id of their VM's slot (
slot - 1, 0..6) instead of 0. A slot belongs to one VM, so live VMs never share an id, and the firmware's save/load runs on every switch between VMs. Nothing else changes: control block, stack, barrier and pool sizing (a8_pm_blocks) are as merged in #196.A new VM that takes a just-freed slot while that id is still loaded gets no load, as on iOS, where a freed id is handed out again at once in the same way.
Testing
iPod touch 6 (N102), installed system, labwc desktop on the GPU (Zink), with both patches (the flown driver source equals this branch's).
a8_pm_blocks32 and 61 at once, 330 + 344 fps; a Wayland client at 61, then one at 16, each next to the compositor's 32: 463 and 461 fps;Build: n102 (
apple-4k) on clang 19 with no compiler warnings; against a build ofmain, onlypowervr.kochanges (227 of 228 output files identical). The series audit (kernel/audit-patches.py) passes with both patches for N102, N61, N56, J96 and J97, which share theapple-4kkernel and all enable the GPU node.iPhone 6 and iPad mini 4: the desktop test for these boards follows once this is in a build.
🤖 Generated with Claude Code