Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Daniele Ceraolo Spurio" <daniele.ceraolospurio@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>
Subject: [PATCH v7 09/10] drm/xe/hw_engine: document top-down paging requirement
Date: Fri, 26 Jun 2026 12:15:30 +0100	[thread overview]
Message-ID: <20260626111520.487997-21-matthew.auld@intel.com> (raw)
In-Reply-To: <20260626111520.487997-12-matthew.auld@intel.com>

We were doing this anyway, but going forward for paging engines,
agreement is to always reserve BCS instances in top down fashion. This
hopefully future proofs things for VFs, where in some low-level places
it might only have the physical BCS instance from the hw pov. If we
stick to a consistent mapping scheme, it should make it possible to
determine if this is a special paging engine, or not.

v2 (Daniele)
  - Give a concrete example, like with page fault descriptor

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
---
 drivers/gpu/drm/xe/xe_hw_engine.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index d2c6b8645a62..fc533a6257fe 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -673,7 +673,6 @@ static int hw_engine_setup_logical_and_paging_mapping(struct xe_gt *gt)
 		if (hwe->class == XE_ENGINE_CLASS_COPY)
 			num_copy_engines++;
 
-	/* We just reserve the highest BCS instance for USM */
 	if (num_copy_engines && xe->info.has_usm)
 		num_paging_engines = 1;
 
@@ -700,6 +699,18 @@ static int hw_engine_setup_logical_and_paging_mapping(struct xe_gt *gt)
 	if (xe_gt_WARN_ON(gt, num_paging_engines > num_copy_engines))
 		return -EINVAL;
 
+	/*
+	 * On PF, we just reserve the highest BCS instance for USM.
+	 *
+	 * Note: This is now a requirement going forward. The PF must ALWAYS
+	 * reserve BCS instances in top-down order, that way the VF has a chance
+	 * of discovering the physical BCS instance mappings for paging engines,
+	 * in conjunction with vf_num_paging_engines. In some places we might
+	 * only have the physical instance, and from hw pov there is no such
+	 * thing as a paging engine. For example, the page fault descriptor,
+	 * which comes directly from the hw, will use the physical engine
+	 * instance.
+	 */
 	reserved_logical_bcs_start = num_copy_engines - num_paging_engines;
 
 	/* FIXME: Doing a simple logical mapping that works for most hardware */
-- 
2.54.0


  parent reply	other threads:[~2026-06-26 11:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 11:15 [PATCH v7 00/10] GuC paging engine support Matthew Auld
2026-06-26 11:15 ` [PATCH v7 01/10] drm/xe/guc: refactor ads to use guc_class Matthew Auld
2026-06-26 11:15 ` [PATCH v7 02/10] drm/xe/guc: refactor to_guc_class() to accept hwe Matthew Auld
2026-06-26 11:15 ` [PATCH v7 03/10] drm/xe/guc: add the plumbing for GUC_PAGING_CLASS Matthew Auld
2026-06-26 11:15 ` [PATCH v7 04/10] drm/xe/hw_engine: don't open code is_usm_hwe() Matthew Auld
2026-06-26 11:15 ` [PATCH v7 05/10] drm/xe: refactor the paging engine setup Matthew Auld
2026-07-08 13:08   ` Francois Dugast
2026-06-26 11:15 ` [PATCH v7 06/10] drm/xe/guc: handle guc logical instance for paging engine Matthew Auld
2026-06-26 11:15 ` [PATCH v7 07/10] drm/xe/guc: handle submit mask with " Matthew Auld
2026-06-26 11:15 ` [PATCH v7 08/10] drm/xe/vf: wire up NUM_PAGING_ENGINE_INSTANCES Matthew Auld
2026-06-26 11:15 ` Matthew Auld [this message]
2026-06-26 11:15 ` [PATCH v7 10/10] drm/xe/guc: toggle paging engine support for NVL-S+ Matthew Auld
2026-07-08 20:12   ` Daniele Ceraolo Spurio
2026-06-29 12:55 ` ✓ CI.KUnit: success for GuC paging engine support (rev7) Patchwork
2026-06-29 13:37 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-29 15:36 ` ✗ Xe.CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260626111520.487997-21-matthew.auld@intel.com \
    --to=matthew.auld@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox