Repository navigation
drm/imagination: apple: account S8003 firmware phase time in apple_jobs - #122
Merged
3 commits merged intoDec 4, 2026
Merged
3 commits merged into
3 commits merged into
Conversation
Account for live PM pool objects, including replacements prepared for a later geometry job. Expose that total and each reserved set's capacity, last firmware feedback and control words through apple_jobs. Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
The A9 firmware runs one scene at a time per VM. The job dependency code orders a VM's geometry after the previous VM's fragment work, so up to two scenes can be live on the two sets of one VM. Each set's free list names the PM pages directly. Share one pool per set index between VMs, as the A10 shares free-list pages. This keeps 128 blocks per scene and limits pinned PM pool memory to 32 MiB, down from 16 MiB per allocated set. Count any wait for a previous user of a shared pool and retain per-set allocation behind apple_pm_shared=0. Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
…euse Expose the firmware's retired geometry and fragment phase times, in 24 MHz ticks, alongside the existing host in-flight counters. The two W records alternate by sequence parity. Both submit paths wait for last_seq - 1 before writing seq = last_seq + 1, so the prior job in that slot has retired. dma_rmb() orders the same coherent CPU mapping used by the done stamp. Preserve W+0x550/0x8ac before fill_ta/fill_3d memsets W, then count it in s8003_job_write before the result is zeroed. A rejected fill cannot double-count an old result. No firmware record, submission ordering or clock policy changes. Affects: Apple A9 (S8003); measurement only Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com>
a64203b
|
Merged, thank you Berkay! Having the firmware's own geometry and fragment phase times in How it landed: after #126 your branch conflicted on one call in Follow-up: the device numbers came from your integration kernel. A run of the merged |
henrikklee
pushed a commit
to ricktav/linux
that referenced
this pull request
Dec 4, 2026
The S8000 and S8003 (A9) select their combined SoC and memory performance state in one PMGR register, as the T8010 does: describe it as a single "soc-ps" region. [Orchard: from orchard PR OrchardLinux#122, commit 5775e3ed; unchanged] Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com> Link: OrchardLinux/orchard#231 (comment)
henrikklee
pushed a commit
to ricktav/linux
that referenced
this pull request
Dec 4, 2026
The S8000 and S8003 (A9) boot with SoC and memory in their low performance state: memory at 800 of 1200 MHz. Nothing on Linux raises it, so CPU and GPU run on two thirds of the memory bandwidth. On a J71t the high state takes CPU read bandwidth from 8.8 to 15.1 GB/s and glmark2 scenes 13-64 % faster at the same GPU clock. The register, the two states (0xd low, 0xc high) and the pending bit are the T8010's, so the A9 and A10 share one description: high at probe, low on suspend. iOS's PMGR driver waits up to 8 ms for the change; it takes 0.5-0.7 ms on the J71t, close to the 1 ms the T8010 waited, so both wait up to iOS's 8 ms. [Orchard: from orchard PR OrchardLinux#122, commit 5775e3ed; reworked so the A9 and A10 share one description and timeout instead of a second variant] Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com> Link: OrchardLinux/orchard#231 (comment)
henrikklee
pushed a commit
to ricktav/linux
that referenced
this pull request
Dec 4, 2026
The PMGR register that selects the SoC and memory performance states, for apple-pmgr-misc, at the same address and with the same layout as on the T8010. [Orchard: from orchard PR OrchardLinux#122, commit 5775e3ed; unchanged] Assisted-by: LLM Signed-off-by: Berkay Kösebay <brkosebay@users.noreply.github.com> Link: OrchardLinux/orchard#231 (comment)
henrikklee
added a commit
to theChristopher16/linux
that referenced
this pull request
Dec 4, 2026
…mestamps drm/imagination: apple: account S8003 firmware phase time in apple_jobs Resolve the conflict with OrchardLinux#126 in s8003_submit_frag(): keep the per-device PM set address from OrchardLinux#126 and pass OrchardLinux#122's gpu_ticks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #121 (shared PM pools). This branch carries its two commits; only the last commit is new here.
apple_jobsshowed the host's view of a job (submit to done), which includes queueing and kernel time. This adds the firmware's own retired geometry and fragment phase times, in 24 MHz ticks, as agpu_ns geometry … fragment … jobs … zero …line, so the GPU's execution time can be told apart from the per-job overhead around it.The two W records alternate by sequence parity. Both submit paths wait for
last_seq - 1before writingseq = last_seq + 1, so the previous job in that slot has retired. Its phase times are read (afterdma_rmb()) beforefill_ta/fill_3dclear the record and are added ins8003_job_write. A rejected fill cannot count an old result twice. Firmware records, submission order and clock policy are unchanged: this only measures.Tested on the iPad 5 (j71t), 2026-12-03, in a kernel with this commit: Firefox scroll profiles read it to split GPU busy time into execution and overhead. On YouTube home, GPU execution was 37 % of busy time (Reddit 50 %, Wikipedia 51 %), i.e. about 0.7 ms of fixed non-execution time per geometry+fragment pair.
Built for j71t with Orchard's
kernel/build --kernel-treeon this head.How to test
On a stock Orchard install with this kernel:
Expected on the iPad 5: the counters grow with the work, and
zerostays small (jobs without a firmware time). A10: unchanged, because this is the S8003 (A9) path.