Static arrays will keep their elements constant, therefore break
apps packages control of the driver
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>
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>
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>
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
5ac1e81d3de13e2c4554
Gaming control's idea was based on these
Signed-off-by: Diep Quynh <remilia.1505@gmail.com>