Commit c25bda20 authored by Adithya R's avatar Adithya R Committed by arnavpuranik
Browse files

msm: kgsl: Prevent GPU boost when battery saver is on

 * 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
parent 1658c4b7
......@@ -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"
......@@ -645,6 +646,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 */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment