Repository navigation
Conversation
…ce state The base performance state of a working G13/G14 GPU comes from the device tree's apple,perf-base-pstate, 1 on the laptops. On a MacBook Pro 14" M1 Pro (J314s) the PMP keeps the memory at its lowest speed until the GPU firmware reports state 4 or higher, and below that a compositor frame on the internal panel is memory bound: about 4.6 ms of GPU time at states 1 to 3 alike, against 2.8 ms at state 4. With pmp_report.agx_vote off it is 4.6 to 4.7 ms at every state. While scrolling in Chrome at 120 Hz that is the difference between 13.5 % of the frames missing their slot at base state 3 and about 4 % at base state 4. Add a module parameter to try other base states without rebuilding the device tree. 0, the default, keeps the device tree's value, so nothing changes unless it is set. One state has to stay above the base for the firmware's boost, so a value past that is refused with a warning. A fixed base state is probably not what a board should ship with; this is for measuring where the thresholds are. The numbers are from a 7.3.0 tree that branched from integration/aurora at 990e00b, with aurora.legacy_perf_base_pstate=3 and =4 on the command line. Assisted-by: LLM
|
Review at 6a7b94e (non-author, draft). Thanks for the measurements; they are the valuable part. As a change I would not take the parameter, for the reason you give yourself.
Code-wise the range check is right (one state has to stay above the base for boosts), and the default 0 keeps the DT value. Suggest keeping the data in #2839 and closing this one, or turning it into the memory-floor change. Assisted-by: LLM (Claude:Opus 5.5) |
|
On my 16-inch M1 Max (J316c), the live GPU DT has a base state of 1 and seven OPP entries. I built the arm64 Asahi driver object from This was a build and host-side range test. The running kernel was 7.2.11-14-1-ARCH with the PMP controller disabled. I have no M1 Max scrolling or power result for the override. I also checked the generation-scope point raised above: the T8122 extended path in |
|
A knob is not something to carry, and I don't have a memory-floor change to put in its place: I have not tried the approach from #1486 on the J314s. I'm fine with closing this one, the numbers stay in #2839. @DanteCpp, thanks for running the range check with the J316c's values, and for looking at the T8122 path. |
|
Closing as you agreed in #2842 (comment): the base-pstate module parameter isn't something to carry, and the measurements stay in #2839. Thanks for the numbers. The branch stays, so this can be reopened if a memory-floor change comes out of it. |
Hi! This is the kernel part of the scrolling write-up in #2839: a module parameter,
aurora.legacy_perf_base_pstate, that overrides the device tree'sapple,perf-base-pstatefor the G13/G14 GPUs. It defaults to 0, which keeps the device tree's value, so nothing changes for anyone who does not set it.The reason for it is what I measured on a MacBook Pro 14" M1 Pro (J314s). With the laptops' base state of 1, a compositor frame on the internal panel takes about 4.6 ms of GPU time at states 1 to 3 alike and 2.8 ms at state 4, because the PMP only raises the memory speed once the GPU firmware reports state 4 or higher. With
pmp_report.agx_voteoff it is 4.6 to 4.7 ms at every state, so the vote is what makes state 4 fast. Scrolling in Chrome at 120 Hz went from 13.5 % of the frames missing their slot at base state 3 to about 4 % at base state 4, and the rest of the way to 0.1 % was userspace (compositor and scheduler settings, described in the issue). Base state 4 cost nothing I could measure at idle, about 0.3 W while scrolling or playing 60 fps video, and 0.11 to 0.14 W with 24 fps video.To be clear about what this is: it is a knob for measuring, not a fix that is on by default, and I do not think a fixed base state of 4 is what the laptops should ship with. Apple's desktops with the same chips use 3 in their device trees, which is not enough here, and the better answer is probably in the PMP thresholds or a demand floor for the memory speed like the one for J613/J615 in #1486. I am happy to drop this if you would rather not carry a parameter like it; the numbers are the useful part.
The measurements are from my local 7.3.0 tree, which branched from integration/aurora at 990e00b, where I have run the parameter at 3 and 4 over several boots and deep sleeps. On the current integration/aurora it is build-tested only (full arm64 LLVM build, CLIPPY=1 on drivers/gpu/drm/asahi, rustfmt gives no new differences in the two files, and tools/asahi/run-host-tests.py gives the same result as on the base); I have not booted it there yet. Draft until I have, and until my sign-off is on the commit.
Thanks for taking a look!