Lines Matching refs:config_store
15 static struct auto_mode_mode_config config_store; variable
115 struct power_table_control *pwr_ctrl = &config_store.mode_set[idx].power_control; in amd_pmf_set_automode()
128 apmf_update_fan_idx(dev, config_store.mode_set[idx].fan_control.manual, in amd_pmf_set_automode()
129 config_store.mode_set[idx].fan_control.fan_id); in amd_pmf_set_automode()
160 if ((config_store.transition[i].shifting_up && avg_power >= in amd_pmf_trans_automode()
161 config_store.transition[i].power_threshold) || in amd_pmf_trans_automode()
162 (!config_store.transition[i].shifting_up && avg_power <= in amd_pmf_trans_automode()
163 config_store.transition[i].power_threshold)) { in amd_pmf_trans_automode()
164 if (config_store.transition[i].timer < in amd_pmf_trans_automode()
165 config_store.transition[i].time_constant) in amd_pmf_trans_automode()
166 config_store.transition[i].timer += time_elapsed_ms; in amd_pmf_trans_automode()
168 config_store.transition[i].timer = 0; in amd_pmf_trans_automode()
171 if (config_store.transition[i].timer >= in amd_pmf_trans_automode()
172 config_store.transition[i].time_constant && in amd_pmf_trans_automode()
173 !config_store.transition[i].applied) { in amd_pmf_trans_automode()
174 config_store.transition[i].applied = true; in amd_pmf_trans_automode()
176 } else if (config_store.transition[i].timer <= in amd_pmf_trans_automode()
177 config_store.transition[i].time_constant && in amd_pmf_trans_automode()
178 config_store.transition[i].applied) { in amd_pmf_trans_automode()
179 config_store.transition[i].applied = false; in amd_pmf_trans_automode()
185 state_as_str(config_store.current_mode)); in amd_pmf_trans_automode()
188 time_elapsed_ms, config_store.transition[i].timer, in amd_pmf_trans_automode()
189 config_store.transition[i].time_constant); in amd_pmf_trans_automode()
192 config_store.transition[i].shifting_up, in amd_pmf_trans_automode()
193 config_store.transition[i].power_threshold, in amd_pmf_trans_automode()
194 config_store.mode_set[i].power_floor, in amd_pmf_trans_automode()
195 config_store.transition[i].power_delta); in amd_pmf_trans_automode()
200 state_as_str(config_store.current_mode)); in amd_pmf_trans_automode()
204 config_store.transition[0].applied, in amd_pmf_trans_automode()
205 config_store.transition[1].applied, in amd_pmf_trans_automode()
206 config_store.transition[2].applied, in amd_pmf_trans_automode()
207 config_store.transition[3].applied); in amd_pmf_trans_automode()
213 if (config_store.transition[j].applied) { in amd_pmf_trans_automode()
214 if (config_store.current_mode != in amd_pmf_trans_automode()
215 config_store.transition[j].target_mode) { in amd_pmf_trans_automode()
216 config_store.current_mode = in amd_pmf_trans_automode()
217 config_store.transition[j].target_mode; in amd_pmf_trans_automode()
219 state_as_str(config_store.current_mode)); in amd_pmf_trans_automode()
220 amd_pmf_set_automode(dev, config_store.current_mode, NULL); in amd_pmf_trans_automode()
230 int mode = config_store.current_mode; in amd_pmf_update_2_cql()
232 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].target_mode = in amd_pmf_update_2_cql()
236 mode != config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].target_mode) { in amd_pmf_update_2_cql()
237 mode = config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].target_mode; in amd_pmf_update_2_cql()
245 config_store.transition[AUTO_TRANSITION_TO_QUIET].power_threshold = in amd_pmf_get_power_threshold()
246 config_store.mode_set[AUTO_BALANCE].power_floor - in amd_pmf_get_power_threshold()
247 config_store.transition[AUTO_TRANSITION_TO_QUIET].power_delta; in amd_pmf_get_power_threshold()
249 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].power_threshold = in amd_pmf_get_power_threshold()
250 config_store.mode_set[AUTO_BALANCE].power_floor - in amd_pmf_get_power_threshold()
251 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].power_delta; in amd_pmf_get_power_threshold()
253 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].power_threshold = in amd_pmf_get_power_threshold()
254 config_store.mode_set[AUTO_QUIET].power_floor - in amd_pmf_get_power_threshold()
255 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].power_delta; in amd_pmf_get_power_threshold()
257 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].power_threshold = in amd_pmf_get_power_threshold()
258 config_store.mode_set[AUTO_PERFORMANCE].power_floor - in amd_pmf_get_power_threshold()
259 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].power_delta; in amd_pmf_get_power_threshold()
263 config_store.transition[AUTO_TRANSITION_TO_QUIET].power_threshold, in amd_pmf_get_power_threshold()
264 config_store.mode_set[AUTO_BALANCE].power_floor, in amd_pmf_get_power_threshold()
265 config_store.transition[AUTO_TRANSITION_TO_QUIET].power_delta); in amd_pmf_get_power_threshold()
268 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].power_threshold, in amd_pmf_get_power_threshold()
269 config_store.mode_set[AUTO_BALANCE].power_floor, in amd_pmf_get_power_threshold()
270 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].power_delta); in amd_pmf_get_power_threshold()
273 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE] in amd_pmf_get_power_threshold()
275 config_store.mode_set[AUTO_QUIET].power_floor, in amd_pmf_get_power_threshold()
276 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].power_delta); in amd_pmf_get_power_threshold()
279 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE] in amd_pmf_get_power_threshold()
281 config_store.mode_set[AUTO_PERFORMANCE].power_floor, in amd_pmf_get_power_threshold()
282 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].power_delta); in amd_pmf_get_power_threshold()
310 config_store.transition[AUTO_TRANSITION_TO_QUIET].time_constant = in amd_pmf_load_defaults_auto_mode()
312 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].time_constant = in amd_pmf_load_defaults_auto_mode()
314 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].time_constant = in amd_pmf_load_defaults_auto_mode()
316 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].time_constant = in amd_pmf_load_defaults_auto_mode()
320 config_store.mode_set[AUTO_QUIET].power_floor = output.pfloor_quiet; in amd_pmf_load_defaults_auto_mode()
321 config_store.mode_set[AUTO_BALANCE].power_floor = output.pfloor_balanced; in amd_pmf_load_defaults_auto_mode()
322 config_store.mode_set[AUTO_PERFORMANCE].power_floor = output.pfloor_perf; in amd_pmf_load_defaults_auto_mode()
323 config_store.mode_set[AUTO_PERFORMANCE_ON_LAP].power_floor = output.pfloor_perf; in amd_pmf_load_defaults_auto_mode()
326 config_store.transition[AUTO_TRANSITION_TO_QUIET].power_delta = in amd_pmf_load_defaults_auto_mode()
328 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].power_delta = in amd_pmf_load_defaults_auto_mode()
330 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].power_delta = in amd_pmf_load_defaults_auto_mode()
332 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].power_delta = in amd_pmf_load_defaults_auto_mode()
339 pwr_ctrl = &config_store.mode_set[AUTO_QUIET].power_control; in amd_pmf_load_defaults_auto_mode()
348 pwr_ctrl = &config_store.mode_set[AUTO_BALANCE].power_control; in amd_pmf_load_defaults_auto_mode()
357 pwr_ctrl = &config_store.mode_set[AUTO_PERFORMANCE].power_control; in amd_pmf_load_defaults_auto_mode()
366 pwr_ctrl = &config_store.mode_set[AUTO_PERFORMANCE_ON_LAP].power_control; in amd_pmf_load_defaults_auto_mode()
376 config_store.mode_set[AUTO_QUIET].fan_control.fan_id = output.fan_id_quiet; in amd_pmf_load_defaults_auto_mode()
377 config_store.mode_set[AUTO_BALANCE].fan_control.fan_id = output.fan_id_balanced; in amd_pmf_load_defaults_auto_mode()
378 config_store.mode_set[AUTO_PERFORMANCE].fan_control.fan_id = output.fan_id_perf; in amd_pmf_load_defaults_auto_mode()
379 config_store.mode_set[AUTO_PERFORMANCE_ON_LAP].fan_control.fan_id = in amd_pmf_load_defaults_auto_mode()
382 config_store.transition[AUTO_TRANSITION_TO_QUIET].target_mode = AUTO_QUIET; in amd_pmf_load_defaults_auto_mode()
383 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].target_mode = in amd_pmf_load_defaults_auto_mode()
385 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].target_mode = in amd_pmf_load_defaults_auto_mode()
387 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].target_mode = in amd_pmf_load_defaults_auto_mode()
390 config_store.transition[AUTO_TRANSITION_TO_QUIET].shifting_up = false; in amd_pmf_load_defaults_auto_mode()
391 config_store.transition[AUTO_TRANSITION_TO_PERFORMANCE].shifting_up = true; in amd_pmf_load_defaults_auto_mode()
392 config_store.transition[AUTO_TRANSITION_FROM_QUIET_TO_BALANCE].shifting_up = true; in amd_pmf_load_defaults_auto_mode()
393 config_store.transition[AUTO_TRANSITION_FROM_PERFORMANCE_TO_BALANCE].shifting_up = in amd_pmf_load_defaults_auto_mode()
397 if (config_store.mode_set[i].fan_control.fan_id == FAN_INDEX_AUTO) in amd_pmf_load_defaults_auto_mode()
398 config_store.mode_set[i].fan_control.manual = false; in amd_pmf_load_defaults_auto_mode()
400 config_store.mode_set[i].fan_control.manual = true; in amd_pmf_load_defaults_auto_mode()
404 config_store.current_mode = AUTO_BALANCE; in amd_pmf_load_defaults_auto_mode()
407 amd_pmf_dump_auto_mode_defaults(&config_store); in amd_pmf_load_defaults_auto_mode()
429 amd_pmf_set_automode(dev, config_store.current_mode, NULL); in amd_pmf_handle_amt()