Lines Matching refs:policy

61 static unsigned int generic_powersave_bias_target(struct cpufreq_policy *policy,  in generic_powersave_bias_target()  argument
68 struct policy_dbs_info *policy_dbs = policy->governor_data; in generic_powersave_bias_target()
72 struct cpufreq_frequency_table *freq_table = policy->freq_table; in generic_powersave_bias_target()
80 index = cpufreq_frequency_table_target(policy, freq_next, relation); in generic_powersave_bias_target()
86 index = cpufreq_table_find_index_h(policy, freq_avg, in generic_powersave_bias_target()
89 index = cpufreq_table_find_index_l(policy, freq_avg, in generic_powersave_bias_target()
108 static void ondemand_powersave_bias_init(struct cpufreq_policy *policy) in ondemand_powersave_bias_init() argument
110 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in ondemand_powersave_bias_init()
115 static void dbs_freq_increase(struct cpufreq_policy *policy, unsigned int freq) in dbs_freq_increase() argument
117 struct policy_dbs_info *policy_dbs = policy->governor_data; in dbs_freq_increase()
122 freq = od_ops.powersave_bias_target(policy, freq, in dbs_freq_increase()
124 else if (policy->cur == policy->max) in dbs_freq_increase()
127 __cpufreq_driver_target(policy, freq, od_tuners->powersave_bias ? in dbs_freq_increase()
136 static void od_update(struct cpufreq_policy *policy) in od_update() argument
138 struct policy_dbs_info *policy_dbs = policy->governor_data; in od_update()
142 unsigned int load = dbs_update(policy); in od_update()
149 if (policy->cur < policy->max) in od_update()
151 dbs_freq_increase(policy, policy->max); in od_update()
156 min_f = policy->cpuinfo.min_freq; in od_update()
157 max_f = policy->cpuinfo.max_freq; in od_update()
164 freq_next = od_ops.powersave_bias_target(policy, in od_update()
168 __cpufreq_driver_target(policy, freq_next, CPUFREQ_RELATION_CE); in od_update()
172 static unsigned int od_dbs_update(struct cpufreq_policy *policy) in od_dbs_update() argument
174 struct policy_dbs_info *policy_dbs = policy->governor_data; in od_dbs_update()
186 __cpufreq_driver_target(policy, dbs_info->freq_lo, in od_dbs_update()
191 od_update(policy); in od_dbs_update()
312 ondemand_powersave_bias_init(policy_dbs->policy); in powersave_bias_store()
391 static void od_start(struct cpufreq_policy *policy) in od_start() argument
393 struct od_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); in od_start()
396 ondemand_powersave_bias_init(policy); in od_start()
429 struct cpufreq_policy *policy; in od_set_powersave_bias() local
437 policy = cpufreq_cpu_get_raw(cpu); in od_set_powersave_bias()
438 if (!policy || policy->governor != &CPU_FREQ_GOV_ONDEMAND) in od_set_powersave_bias()
441 policy_dbs = policy->governor_data; in od_set_powersave_bias()
445 cpumask_or(done, done, policy->cpus); in od_set_powersave_bias()