[Intel-gfx] [PATCH] drm/i915/guc: Support programming the EU priority in the GuC descriptor

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Wed May 4 00:44:46 UTC 2022


From: Matthew Brost <matthew.brost at intel.com>

The EU priority register must be updated by the GuC rather than the
driver as it is context specific and only the GuC knows which context
is currently executing.

Cc: John Harrison <john.c.harrison at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty at intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 75291e9846c50..8f3ed60ff07d9 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -2420,6 +2420,8 @@ static void prepare_context_registration_info(struct intel_context *ce,
 	 */
 	info->hwlrca_lo = lower_32_bits(ce->lrc.lrca);
 	info->hwlrca_hi = upper_32_bits(ce->lrc.lrca);
+	if (engine->flags & I915_ENGINE_HAS_EU_PRIORITY)
+		info->hwlrca_lo |= lrc_desc_priority(ce->guc_state.prio);
 	info->flags = CONTEXT_REGISTRATION_FLAG_KMD;
 
 	/*
-- 
2.25.1



More information about the Intel-gfx mailing list