Lines Matching defs:freq

26 static int slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 freq)
30 ret = intel_guc_slpc_set_min_freq(slpc, freq);
32 pr_err("Could not set min frequency to [%u]\n", freq);
39 static int slpc_set_max_freq(struct intel_guc_slpc *slpc, u32 freq)
43 ret = intel_guc_slpc_set_max_freq(slpc, freq);
46 freq);
53 static int slpc_set_freq(struct intel_gt *gt, u32 freq)
58 err = slpc_set_max_freq(slpc, freq);
60 pr_err("Unable to update max freq");
64 err = slpc_set_min_freq(slpc, freq);
66 pr_err("Unable to update min freq");
79 pr_err("Unable to restore max freq");
85 pr_err("Unable to restore min freq");
91 pr_err("Unable to restore efficient freq");
98 static u64 slpc_measure_power(struct intel_rps *rps, int *freq)
106 *freq = (*freq + intel_rps_read_actual_frequency(rps)) / 2;
113 static u64 measure_power_at_freq(struct intel_gt *gt, int *freq, u64 *power)
117 err = slpc_set_freq(gt, *freq);
120 *freq = intel_rps_read_actual_frequency(&gt->rps);
121 *power = slpc_measure_power(&gt->rps, freq);
144 /* GuC requests freq in multiples of 50/3 MHz */
180 /* GuC requests freq in multiples of 50/3 MHz */
203 int freq;
215 min.freq = slpc->min_freq;
216 err = measure_power_at_freq(gt, &min.freq, &min.power);
221 max.freq = slpc->rp0_freq;
222 err = measure_power_at_freq(gt, &max.freq, &max.power);
229 min.power, min.freq,
230 max.power, max.freq);
232 if (10 * min.freq >= 9 * max.freq) {
234 min.freq, max.freq);
268 pr_err("Pcode did not grant max freq\n");
301 pr_err("Could not get SLPC max freq\n");
306 pr_err("Could not get SLPC min freq\n");
316 pr_err("Unable to update min freq!");
325 pr_err("Unable to turn off efficient freq!");
395 pr_err("Actual freq did not rise above min\n");