Skip to content

Commit

Permalink
msm: kgsl: Prevent GPU boost when battery saver is on
Browse files Browse the repository at this point in the history
 * we force gpu to run at max freq during expensive
   rendering in order to mitigate jank during blur,
   but no need to do this in battery saver mode

Signed-off-by: K A R T H I K <[email protected]>
  • Loading branch information
adithya2306 authored and karthik558 committed Aug 19, 2021
1 parent 94ab852 commit 00dff1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/msm/kgsl_pwrctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/msm_adreno_devfreq.h>
#include <linux/of_device.h>
#include <linux/thermal.h>
#include <linux/battery_saver.h>

#include "kgsl.h"
#include "kgsl_pwrscale.h"
Expand Down Expand Up @@ -691,6 +692,9 @@ static void kgsl_pwrctrl_min_pwrlevel_set(struct kgsl_device *device,
if (level < pwr->max_pwrlevel)
level = pwr->max_pwrlevel;

if (is_battery_saver_on())
level = pwr->num_pwrlevels - 2;

pwr->min_pwrlevel = level;

/* Update the current level using the new limit */
Expand Down

0 comments on commit 00dff1c

Please sign in to comment.