Lines Matching +full:always +full:- +full:turbo

1 // SPDX-License-Identifier: GPL-2.0
3 * Intel Speed Select -- Enumerate and control features
13 if (!isst_ops || !isst_ops->_name) { \
35 return -1; in isst_set_platform_ops()
43 isst_ops->update_platform_param(param, value); in isst_update_platform_param()
49 return isst_ops->get_disp_freq_multiplier(); in isst_get_disp_freq_multiplier()
55 return isst_ops->get_trl_max_levels(); in isst_get_trl_max_levels()
61 return isst_ops->get_trl_level_name(level); in isst_get_trl_level_name()
67 return isst_ops->is_punit_valid(id); in isst_is_punit_valid()
80 err(-1, "%s open failed", pathname); in isst_send_msr_command()
89 if (ioctl(fd, ISST_IF_MSR_COMMAND, &msr_cmds) == -1) { in isst_send_msr_command()
110 return isst_ops->read_pm_config(id, cp_state, cp_cap); in isst_read_pm_config()
116 return isst_ops->get_config_levels(id, pkg_dev); in isst_get_ctdp_levels()
123 return isst_ops->get_ctdp_control(id, config_index, ctdp_level); in isst_get_ctdp_control()
130 return isst_ops->get_tdp_info(id, config_index, ctdp_level); in isst_get_tdp_info()
137 return isst_ops->get_pwr_info(id, config_index, ctdp_level); in isst_get_pwr_info()
144 return isst_ops->get_coremask_info(id, config_index, ctdp_level); in isst_get_coremask_info()
152 ret = isst_send_msr_command(id->cpu, 0x1AD, 0, &msr_trl); in isst_get_get_trl_from_msr()
171 return isst_ops->get_get_trl(id, level, avx_level, trl); in isst_get_get_trl()
177 return isst_ops->get_get_trls(id, level, ctdp_level); in isst_get_get_trls()
183 return isst_ops->get_trl_bucket_info(id, level, buckets_info); in isst_get_trl_bucket_info()
189 return isst_ops->set_tdp_level(id, tdp_level); in isst_set_tdp_level()
206 return -1; in isst_get_pbf_info()
214 isst_display_error_info_message(1, "base-freq feature is not present at this level", 1, level); in isst_get_pbf_info()
215 return -1; in isst_get_pbf_info()
218 pbf_info->core_cpumask_size = alloc_cpu_set(&pbf_info->core_cpumask); in isst_get_pbf_info()
221 return isst_ops->get_pbf_info(id, level, pbf_info); in isst_get_pbf_info()
227 return isst_ops->set_pbf_fact_status(id, pbf, enable); in isst_set_pbf_fact_status()
246 return -1; in isst_get_fact_info()
254 isst_display_error_info_message(1, "turbo-freq feature is not present at this level", 1, level); in isst_get_fact_info()
255 return -1; in isst_get_fact_info()
258 return isst_ops->get_fact_info(id, level, fact_bucket, fact_info); in isst_get_fact_info()
265 ret = isst_send_msr_command(id->cpu, 0x1AD, 0, trl); in isst_get_trl()
279 ret = isst_send_msr_command(id->cpu, 0x1AD, 1, &trl); in isst_set_trl()
293 if (id->cpu < 0) in isst_set_trl_from_current_tdp()
315 /* MSR is always in 100 MHz unit */ in isst_set_trl_from_current_tdp()
322 ret = isst_send_msr_command(id->cpu, 0x1AD, 1, &msr_trl); in isst_set_trl_from_current_tdp()
335 ret = isst_send_msr_command(id->cpu, 0x64b, 0, &tdp_control); in isst_get_config_tdp_lock_status()
348 if (!pkg_dev->processed) in isst_get_process_ctdp_complete()
351 for (i = 0; i < pkg_dev->levels; ++i) { in isst_get_process_ctdp_complete()
354 ctdp_level = &pkg_dev->ctdp_level[i]; in isst_get_process_ctdp_complete()
355 if (ctdp_level->pbf_support) in isst_get_process_ctdp_complete()
356 free_cpu_set(ctdp_level->pbf_info.core_cpumask); in isst_get_process_ctdp_complete()
357 free_cpu_set(ctdp_level->core_cpumask); in isst_get_process_ctdp_complete()
365 return isst_ops->adjust_uncore_freq(id, config_index, ctdp_level); in isst_adjust_uncore_freq()
372 if (pkg_dev->processed) in isst_get_process_ctdp()
380 id->cpu, pkg_dev->enabled, pkg_dev->current_level, in isst_get_process_ctdp()
381 pkg_dev->levels); in isst_get_process_ctdp()
383 if (tdp_level != 0xff && tdp_level > pkg_dev->levels) { in isst_get_process_ctdp()
385 return -1; in isst_get_process_ctdp()
388 if (!pkg_dev->enabled) in isst_get_process_ctdp()
389 …isst_display_error_info_message(0, "perf-profile feature is not supported, just base-config level … in isst_get_process_ctdp()
391 for (i = 0; i <= pkg_dev->levels; ++i) { in isst_get_process_ctdp()
397 debug_printf("cpu:%d Get Information for TDP level:%d\n", id->cpu, in isst_get_process_ctdp()
399 ctdp_level = &pkg_dev->ctdp_level[i]; in isst_get_process_ctdp()
401 ctdp_level->level = i; in isst_get_process_ctdp()
402 ctdp_level->control_cpu = id->cpu; in isst_get_process_ctdp()
403 ctdp_level->pkg_id = id->pkg; in isst_get_process_ctdp()
404 ctdp_level->die_id = id->die; in isst_get_process_ctdp()
411 pkg_dev->processed = 1; in isst_get_process_ctdp()
412 ctdp_level->processed = 1; in isst_get_process_ctdp()
414 if (ctdp_level->pbf_support) { in isst_get_process_ctdp()
415 ret = isst_get_pbf_info(id, i, &ctdp_level->pbf_info); in isst_get_process_ctdp()
417 ctdp_level->pbf_found = 1; in isst_get_process_ctdp()
420 if (ctdp_level->fact_support) { in isst_get_process_ctdp()
422 &ctdp_level->fact_info); in isst_get_process_ctdp()
427 if (!pkg_dev->enabled && is_skx_based_platform()) { in isst_get_process_ctdp()
430 freq = get_cpufreq_base_freq(id->cpu); in isst_get_process_ctdp()
432 ctdp_level->sse_p1 = freq / 100000; in isst_get_process_ctdp()
433 ctdp_level->tdp_ratio = ctdp_level->sse_p1; in isst_get_process_ctdp()
436 isst_get_get_trl_from_msr(id, ctdp_level->trl_ratios[0]); in isst_get_process_ctdp()
437 isst_get_trl_bucket_info(id, i, &ctdp_level->trl_cores); in isst_get_process_ctdp()
449 ctdp_level->core_cpumask_size = in isst_get_process_ctdp()
450 alloc_cpu_set(&ctdp_level->core_cpumask); in isst_get_process_ctdp()
455 ret = isst_get_trl_bucket_info(id, i, &ctdp_level->trl_cores); in isst_get_process_ctdp()
465 …sage(0, "Invalid level, Can't get TDP control information at specified levels on cpu", 1, id->cpu); in isst_get_process_ctdp()
473 return isst_ops->get_clos_information(id, enable, type); in isst_clos_get_clos_information()
479 return isst_ops->pm_qos_config(id, enable_clos, priority_type); in isst_pm_qos_config()
485 return isst_ops->pm_get_clos(id, clos, clos_config); in isst_pm_get_clos()
491 return isst_ops->set_clos(id, clos, clos_config); in isst_set_clos()
497 return isst_ops->clos_get_assoc_status(id, clos_id); in isst_clos_get_assoc_status()
503 return isst_ops->clos_associate(id, clos_id); in isst_clos_associate()