Loading drivers/devfreq/governor_msm_adreno_tz.c +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq, */ if ((stats.total_time == 0) || (priv->bin.total_time < FLOOR)) { return 0; return 1; } level = devfreq_get_freq_level(devfreq, stats.current_frequency); Loading Loading @@ -125,8 +125,10 @@ static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq, * By setting freq as UINT_MAX we notify the kgsl target function * to go up one power level without considering the freq value */ if (val < 0) if (val < 0) { *flag = DEVFREQ_FLAG_FAST_HINT; *freq = UINT_MAX; } return 0; } Loading drivers/gpu/msm/kgsl_pwrscale.c +5 −6 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ int kgsl_devfreq_target(struct device *dev, unsigned long *freq, u32 flags) struct kgsl_pwrctrl *pwr; int level = -1, i; unsigned long cur_freq; int lubflag = 0; int bus_mod = 0; if (device == NULL) return -ENODEV; Loading @@ -185,20 +185,19 @@ int kgsl_devfreq_target(struct device *dev, unsigned long *freq, u32 flags) profile = &device->pwrscale.profile; pwr = &device->pwrctrl; if (flags & DEVFREQ_FLAG_LEAST_UPPER_BOUND) lubflag = 1; if (flags & DEVFREQ_FLAG_FAST_HINT) bus_mod = 1; mutex_lock(&device->mutex); cur_freq = kgsl_pwrctrl_active_freq(pwr); if (*freq > cur_freq && pwr->active_pwrlevel > 0) { /* * If LUB - Least Upper Bound - is requested * - move up just one level, * If FAST is requested, move up just one level, * otherwise - move up until required freq or higher */ level = pwr->active_pwrlevel - 1; if (!lubflag) if (!bus_mod) while (*freq > pwr->pwrlevels[level].gpu_freq && level > 0) level--; Loading include/linux/devfreq.h +3 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ struct devfreq_dev_status { */ #define DEVFREQ_FLAG_LEAST_UPPER_BOUND 0x1 #define DEVFREQ_FLAG_FAST_HINT 0x2 #define DEVFREQ_FLAG_SLOW_HINT 0x4 /** * struct devfreq_governor_data - mapping to per device governor data * @name: The name of the governor. Loading Loading
drivers/devfreq/governor_msm_adreno_tz.c +4 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq, */ if ((stats.total_time == 0) || (priv->bin.total_time < FLOOR)) { return 0; return 1; } level = devfreq_get_freq_level(devfreq, stats.current_frequency); Loading Loading @@ -125,8 +125,10 @@ static int tz_get_target_freq(struct devfreq *devfreq, unsigned long *freq, * By setting freq as UINT_MAX we notify the kgsl target function * to go up one power level without considering the freq value */ if (val < 0) if (val < 0) { *flag = DEVFREQ_FLAG_FAST_HINT; *freq = UINT_MAX; } return 0; } Loading
drivers/gpu/msm/kgsl_pwrscale.c +5 −6 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ int kgsl_devfreq_target(struct device *dev, unsigned long *freq, u32 flags) struct kgsl_pwrctrl *pwr; int level = -1, i; unsigned long cur_freq; int lubflag = 0; int bus_mod = 0; if (device == NULL) return -ENODEV; Loading @@ -185,20 +185,19 @@ int kgsl_devfreq_target(struct device *dev, unsigned long *freq, u32 flags) profile = &device->pwrscale.profile; pwr = &device->pwrctrl; if (flags & DEVFREQ_FLAG_LEAST_UPPER_BOUND) lubflag = 1; if (flags & DEVFREQ_FLAG_FAST_HINT) bus_mod = 1; mutex_lock(&device->mutex); cur_freq = kgsl_pwrctrl_active_freq(pwr); if (*freq > cur_freq && pwr->active_pwrlevel > 0) { /* * If LUB - Least Upper Bound - is requested * - move up just one level, * If FAST is requested, move up just one level, * otherwise - move up until required freq or higher */ level = pwr->active_pwrlevel - 1; if (!lubflag) if (!bus_mod) while (*freq > pwr->pwrlevels[level].gpu_freq && level > 0) level--; Loading
include/linux/devfreq.h +3 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ struct devfreq_dev_status { */ #define DEVFREQ_FLAG_LEAST_UPPER_BOUND 0x1 #define DEVFREQ_FLAG_FAST_HINT 0x2 #define DEVFREQ_FLAG_SLOW_HINT 0x4 /** * struct devfreq_governor_data - mapping to per device governor data * @name: The name of the governor. Loading