ElementalX governor

Signed-off-by: flar2 <asegaert@gmail.com>
This commit is contained in:
flar2 2013-12-13 00:16:06 -05:00 committed by followmsi
parent f540ccd941
commit addf4c4f52
6 changed files with 1816 additions and 0 deletions

View File

@ -43,6 +43,10 @@
extern uint32_t max_gpu;
#ifdef CONFIG_CPU_FREQ_GOV_ELEMENTALX
extern int graphics_boost;
#endif
enum kgsl_iommu_context_id {
KGSL_IOMMU_CONTEXT_USER = 0,
KGSL_IOMMU_CONTEXT_PRIV = 1,

View File

@ -99,6 +99,13 @@ config CPU_FREQ_DEFAULT_GOV_ONDEMAND
governor. If unsure have a look at the help section of the
driver. Fallback governor will be the performance governor.
config CPU_FREQ_DEFAULT_GOV_ELEMENTALX
bool "elementalx"
select CPU_FREQ_GOV_ELEMENTALX
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'elementalx' as default.
config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
bool "conservative"
select CPU_FREQ_GOV_CONSERVATIVE
@ -184,6 +191,19 @@ config CPU_FREQ_GOV_ONDEMAND
If in doubt, say N.
config CPU_FREQ_GOV_ELEMENTALX
tristate "'elementalx' cpufreq policy governor"
select CPU_FREQ_TABLE
help
'elementalx' - This driver adds a dynamic cpufreq policy governor.
To compile this driver as a module, choose M here: the
module will be called cpufreq_elementalx.
For details, take a look at linux/Documentation/cpu-freq.
If in doubt, say N.
config CPU_FREQ_GOV_INTERACTIVE
tristate "'interactive' cpufreq policy governor"
help

View File

@ -11,6 +11,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o
obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_INTELLIDEMAND) += cpufreq_intellidemand.o
obj-$(CONFIG_CPU_FREQ_GOV_ELEMENTALX) += cpufreq_elementalx.o
# CPUfreq cross-arch helpers
obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o

File diff suppressed because it is too large Load Diff

View File

@ -48,6 +48,10 @@
unsigned long internal_max = 450000000;
#ifdef CONFIG_CPU_FREQ_GOV_ELEMENTALX
int graphics_boost = 6;
#endif
struct clk_pair {
const char *name;
uint map;
@ -192,6 +196,10 @@ void kgsl_pwrctrl_pwrlevel_change(struct kgsl_device *device,
trace_kgsl_pwrlevel(device, pwr->active_pwrlevel, pwrlevel->gpu_freq);
#ifdef CONFIG_CPU_FREQ_GOV_ELEMENTALX
graphics_boost = pwr->active_pwrlevel;
#endif
}
EXPORT_SYMBOL(kgsl_pwrctrl_pwrlevel_change);

View File

@ -373,6 +373,9 @@ extern struct cpufreq_governor cpufreq_gov_userspace;
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND)
extern struct cpufreq_governor cpufreq_gov_ondemand;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_ondemand)
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_ELEMENTALX)
extern struct cpufreq_governor cpufreq_gov_elementalx;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_elementalx)
#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE)
extern struct cpufreq_governor cpufreq_gov_conservative;
#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_conservative)