Repository navigation
gs101: scale and cool the Mali-G78 through ACPM (Pixel 6) - #189
Conversation
|
Thank you, @robotosaith. A Pixel 6 that scales its GPU and slows it when hot is a real step, and I like that the I'd like the L2 clock handled differently, for two reasons.
Two small things for the message: stock also has On evidence: since the daily kernel isn't published, please add the blob ids of the touched files in that tree and Our gate passes on today's |
The Mali-G78 in gs101 is clocked from two ACPM DVFS domains, G3D for the shader cores and G3DL2 for the top level and L2, which have to move together. Add an ID for a clock that sets both, after the 14 DVFS domains, as gs201 has GS201_CLK_ACPM_GPU. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
The Mali-G78 in gs101 is clocked from two DVFS domains, G3D for the shader cores and G3DL2 for the top level and L2. Google's driver moves them together from a fixed table and keeps G3DL2 at or above G3D throughout (gpu_dvfs_set_new_level() in pixel_gpu_dvfs.c: "When clocking down we must set G3D CLK first"). Setting the two clocks one after the other from the GPU driver can't keep that order in both directions. Add gs101 a "gpu" clock as gs201 and zumapro have: its rate is the shader rate, and setting it moves G3DL2 to the paired level, raising it first going up and lowering it last going down. The pairs are Google's gs101 table (gpu_dvfs_table_v2 up to gpu_dvfs_max_freq, 800 MHz), with the 151 and 202 MHz rows that stock's 250 MHz gpu_dvfs_min_freq leaves out. Unlike gs201's, the clock is writable from the start: the levels were run on a Pixel 6 Pro (raven) through devfreq. The other gs101 clocks are unchanged. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
On gs101 the APM firmware (ACPM) sets the G3D voltages together with the G3D and G3D L2 clock rates, so the four GPU rails need no OPP voltages, and panfrost skipped devfreq altogether because the GPU has more than one supply: the GPU ran at the 151 MHz the bootloader left. Add GPU_PM_FW_DVFS for such GPUs: devfreq then sets rates only. The L2 clock is the clock provider's business: on gs101 one ACPM clock moves both domains together, in the order the firmware needs. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
Use the ACPM GPU clock for the Mali-G78 instead of the fixed oscillator stand-in, with Google's gs101 levels (gpu_dvfs_table_v2 capped at gpu_dvfs_max_freq, 800 MHz) as the OPP table. Setting the clock moves G3D and pairs G3DL2 with it, and ACPM applies the voltages, so the table has rates only. Stock's gpu_dvfs_min_freq is 250 MHz; the 151 and 202 MHz levels are kept, as gs201's are. Stock also raises the memory interface (MIF) to 845 MHz for the top three levels; that isn't done here. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
Under a busy shell the Pixel 6 Pro's big cluster reached the 110 °C critical trip and the phone shut down, and nothing slowed the GPU, which heats the whole die. Make the GPU a cooling device, give gpu-thermal passive trips at 80 and 90 °C bound to it, and let the big cluster's second trip slow the GPU too. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
1a3621d to
11ca05c
Compare
|
Thank you for pointing at the order and at the pairing we already have. Reworked as you suggested and force-pushed (five commits, all signed):
Our gate on today's On raven,
trans_statphone-smokephone-smoke: ravenKernel
Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.1-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.15-1, omamobile-device-raven 0.1.32-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.17-1, omamobile-modem-sit 0.3.30-1, omamobile-omarchy 0.1.31-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.94-1, omamobile-voice 0.1.0-1, omaphone 0.2.2-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1 The smoke report's flags are this test kernel's: the published branch's reserved-memory overlap line, One question: gs201's ACPM clocks are |
|
Thank you, @robotosaith. This is exactly what I hoped for. One clock, the pairing in I checked it from my side. I fetched your test branch, and the blob ids match this head, with On your question: I'd leave Merged. Thanks for the quick rework. |
The Pixel 6's GPU runs under panfrost since #3, but at whatever clock the bootloader left. This series lets it scale and gives it a thermal limit.
gpuclock (GS101_CLK_ACPM_GPU) sets the shader rate and moves G3DL2 to its paired level, raising it first going up and lowering it last going down, from Google's gs101 table. The other gs101 clocks and the 7 Pro's data are unchanged.GPU_PM_FW_DVFSfeature (set for gs101 only) skips the OPP regulators. Every other panfrost GPU has no such feature, so its code path is unchanged.Tested on raven (Pixel 6 Pro), 2026-11-04. This series on the published
omamobileplus #116, the USB override and #188 (7.3.0-rc6-omamobile-push1-g2da350efc340, with one test-only commit that reads the firmware's rates; details):simple_ondemandover all 11 levels, idle at 151 MHz with G3DL2 at 302 MHz, and in 4987 stable samples of the firmware's rates under load G3DL2 never below G3D. Before the rework the GPU ran the same levels daily since 2026-10-20 (GPU-PLAN G5), with L2 set from the OPP table.Checks:
tools/kernel-pr-check --build --merge origin/omamobile: merges cleanly, checkpatch--strictclean, W=1 builds of the three touched C files clean, 9 device trees withW=1anddtbs_check(dtschema 2026.9), no new warnings.Not tested: the Pixel 6 (oriole) and 6a (bluejay), which share gs101.dtsi.
🤖 Generated with Claude Code