[PATCH 13/15] drm/xe: Set slpc freq to max on ULLS jobs
Matthew Brost
matthew.brost at intel.com
Thu Jun 5 15:32:21 UTC 2025
ULLS jobs should run as fast as possible, as such, increase SLPC
frequency on the ULLS queue to the maximum.
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_guc_submit.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index f67dfdb69637..41ac0b41b09b 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -451,6 +451,23 @@ static void init_policies(struct xe_guc *guc, struct xe_exec_queue *q)
__guc_exec_queue_policy_action_size(&policy), 0, 0);
}
+static void set_slpc_freq(struct xe_guc *guc, struct xe_exec_queue *q,
+ bool high_freq)
+{
+ struct exec_queue_policy policy;
+ u32 slpc_exec_queue_freq_req = 0;
+
+ if (high_freq)
+ slpc_exec_queue_freq_req |= SLPC_CTX_FREQ_REQ_IS_COMPUTE;
+
+ __guc_exec_queue_policy_start_klv(&policy, q->guc->id);
+ __guc_exec_queue_policy_add_slpc_exec_queue_freq_req(&policy,
+ slpc_exec_queue_freq_req);
+
+ xe_guc_ct_send(&guc->ct, (u32 *)&policy.h2g,
+ __guc_exec_queue_policy_action_size(&policy), 0, 0);
+}
+
static void set_min_preemption_timeout(struct xe_guc *guc, struct xe_exec_queue *q)
{
struct exec_queue_policy policy;
@@ -718,9 +735,14 @@ static void submit_exec_queue(struct xe_sched_job *job, struct xe_exec_queue *q)
return;
if (job->is_ulls) {
- if (!job->is_ulls_first)
+ if (job->is_ulls_first)
+ set_slpc_freq(guc, q, true);
+ else
xe_hw_engine_write_ring_tail(q->hwe, lrc->ring.tail);
+ if (job->is_ulls_last)
+ set_slpc_freq(guc, q, false);
+
xe_lrc_set_ulls_semaphore(lrc, xe_sched_job_lrc_seqno(job));
}
--
2.34.1
More information about the Intel-xe
mailing list