Repository navigation
Drop the KGSL PWR_MAX constraint patch so the GPU governor can idle - #22
Merged
Merged
Conversation
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.
perf_pwr_max.pymakes every Turnip queue request the GPU's top power level, so the Adreno governor can't clock down while anything renders. This removes the patch, its series entry, the packaging check that required it, and the release-notes line.What the patch did
KGSL_CONTEXT_PWR_CONSTRAINTand setKGSL_CONSTRAINT_PWR_MAXon it right after creation.KGSL_CMDBATCH_PWR_CONSTRAINT.Each flagged submission makes the kernel switch the constraint on at level 0 (
kgsl_pwrctrl_set_constraint), so the GPU stays at its maximum regardless of load.Evidence
On an AYN Thor (Adreno 740, rooted), a DroidDeck session with Steam's UI open:
kgsl_user_pwrlevel_constraint/kgsl_constrainttrace showedPwrlevel Maxrequests from every GPU client in the session (steam, steamwebhelper, Xwayland, gamescope, xdg-desktop-portal), plus the app's own compositor, which loads DD-Turnip as its display driver.kgsl_constraint ... constraint_value=0 status=ONfires continuously.On an AYANEO Pocket FIT Elite (Adreno 830), the GPU sat at 832-1100 MHz at 2-3% load in Steam's UI and in Sonic Mania's menu. With the same two changes it idled at 160 MHz.
What it costs and saves
In Sonic Mania the power difference was within noise (8.34 W vs 8.43 W on the Pocket FIT Elite), because that game barely uses the GPU and its main thread dominates. The saving shows up where the GPU idles between short bursts: Steam's UI, menus, light and frame-capped games. Removing the floor also gives the governor back its thermal headroom.
The risk is frame-time latency on bursty loads, where the governor ramps up from a low level. I haven't benchmarked a GPU-heavy game with and without the patch. That's worth checking before release.
Test plan
python -m unittest discover -s tests(13 tests pass)Also in this PR
Mesa main changed the SSBO emulation condition in
tu_lower_iointo a multi-line test, solinux/0001-tu-mesh-shader-emulation.patchstopped applying attu_shader.cc:1604. The mesh ring inline UBO hunk now anchors on the unchangedir3_const_alloc(... INLINE_UNIFORM_ADDRS ...)line. Same 14 files and 1954 added lines as before. The android and linux series both apply to Mesa mainbeaf3192c2.