Lines Matching full:freq
244 static u32 encode_freq(u32 freq)
246 return DIV_ROUND_CLOSEST(freq * GT_FREQUENCY_SCALER,
252 u32 freq;
254 freq = FIELD_GET(SLPC_MIN_UNSLICE_FREQ_MASK,
255 slpc_shared_data_read(pc, task_state_data.freq));
257 return decode_freq(freq);
265 /* Allow/Disallow punit to process software freq requests */
269 static void pc_set_cur_freq(struct xe_guc_pc *pc, u32 freq)
276 /* Req freq is in units of 16.66 Mhz */
277 rpnswreq = REG_FIELD_PREP(REQ_RATIO_MASK, encode_freq(freq));
286 static int pc_set_min_freq(struct xe_guc_pc *pc, u32 freq)
292 if (freq < pc->rpn_freq || freq > pc->rp0_freq)
300 freq < pc->rpe_freq);
304 freq);
309 u32 freq;
311 freq = FIELD_GET(SLPC_MAX_UNSLICE_FREQ_MASK,
312 slpc_shared_data_read(pc, task_state_data.freq));
314 return decode_freq(freq);
317 static int pc_set_max_freq(struct xe_guc_pc *pc, u32 freq)
324 if (freq < pc->rpn_freq || freq > pc->rp0_freq)
329 freq);
427 u32 freq;
431 freq = xe_mmio_read32(>->mmio, MTL_MIRROR_TARGET_WP1);
432 freq = REG_FIELD_GET(MTL_CAGF_MASK, freq);
434 freq = xe_mmio_read32(>->mmio, GT_PERF_STATUS);
435 freq = REG_FIELD_GET(CAGF_MASK, freq);
438 freq = decode_freq(freq);
440 return freq;
446 * @freq: A pointer to a u32 where the freq value will be returned
451 int xe_guc_pc_get_cur_freq(struct xe_guc_pc *pc, u32 *freq)
457 * GuC SLPC plays with cur freq request when GuCRC is enabled
466 *freq = xe_mmio_read32(>->mmio, RPNSWREQ);
468 *freq = REG_FIELD_GET(REQ_RATIO_MASK, *freq);
469 *freq = decode_freq(*freq);
476 * xe_guc_pc_get_rp0_freq - Get the RP0 freq
479 * Returns: RP0 freq.
487 * xe_guc_pc_get_rpa_freq - Get the RPa freq
490 * Returns: RPa freq.
500 * xe_guc_pc_get_rpe_freq - Get the RPe freq
503 * Returns: RPe freq.
513 * xe_guc_pc_get_rpn_freq - Get the RPn freq
516 * Returns: RPn freq.
526 * @freq: A pointer to a u32 where the freq value will be returned
531 int xe_guc_pc_get_min_freq(struct xe_guc_pc *pc, u32 *freq)
548 *freq = pc_get_min_freq(pc);
558 * @freq: The selected minimal frequency
564 int xe_guc_pc_set_min_freq(struct xe_guc_pc *pc, u32 freq)
575 ret = pc_set_min_freq(pc, freq);
579 pc->user_requested_min = freq;
589 * @freq: A pointer to a u32 where the freq value will be returned
594 int xe_guc_pc_get_max_freq(struct xe_guc_pc *pc, u32 *freq)
609 *freq = pc_get_max_freq(pc);
619 * @freq: The selected maximum frequency value
625 int xe_guc_pc_set_max_freq(struct xe_guc_pc *pc, u32 freq)
636 ret = pc_set_max_freq(pc, freq);
640 pc->user_requested_max = freq;
1019 /* Request max possible since dynamic freq mgmt is not enabled */
1097 /* Bind requested freq to mert_freq_cap before unload */