Commit graph

9 commits

Author SHA1 Message Date
xxmustafacooTR
66029da636
gaming_control: move custom freq sets to a workqueue
so function can wait for custom voltage initialization without breaking app openings
2024-09-27 17:20:00 +03:00
xxmustafacooTR
c2850f28c2
gaming_control: add a full thermal bypass switch 2024-09-27 17:20:00 +03:00
xxmustafacooTR
248ac42496
gaming_control: add custom gpu/cpus freq and voltage selections 2024-09-27 17:20:00 +03:00
xxmustafacooTR
71e430b7c9
gaming_control, mali: more controls, optimizations 2024-09-27 17:20:00 +03:00
Diep Quynh
850830b157
gaming_control: Adapt PM QoS implementation
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-09-27 17:20:00 +03:00
Diep Quynh
983930637f
gaming_control: Make arrays non-static
Static arrays will keep their elements constant, therefore break
apps packages control of the driver

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-09-27 17:20:00 +03:00
Diep Quynh
cd518f863c
gaming_control: Implement API to store running games
There are 2 purposes of this
- To track games' PIDs
- In case the game was killed, its stored PID will be removed
  When there are none of the games are running, turn off gaming
  mode immediately to prevent unwanted frequency lockup due to
  tasks being killed but the driver doesn't know that it was dead

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-09-27 17:20:00 +03:00
Diep Quynh
75f9b626ee
gaming_control: Remove task kill check
In case task_struct was locked out, we can't check its cmdline
If we do, we'll get a soft lockup

Background and top-app check is enough

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-09-27 17:20:00 +03:00
Diep Quynh
609163c324
drivers: Introduce brand new kernel gaming mode
How to trigger gaming mode? Just open a game that is supported in games list
How to exit? Kill the game from recents, or simply back to homescreen

What does this gaming mode do?
- It limits big cluster maximum frequency to 2,0GHz, and little cluster
  to values matching GPU frequencies as below:
+ 338MHz: 455MHz
+ 385MHz and above: 1053MHz
- As for the cluster freq limits, it overcomes heating issue while playing
  heavy games, as well as saves battery juice

Big thanks to [kerneltoast] for the following commits on his wahoo kernel
5ac1e81d3d
e13e2c4554

Gaming control's idea was based on these

Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
2024-09-27 17:19:55 +03:00