mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 01:11:51 -04:00
drm/xe/hw_engine: document top-down paging requirement
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> Link: https://patch.msgid.link/20260626111520.487997-21-matthew.auld@intel.com
This commit is contained in:
@@ -671,7 +671,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;
|
||||
|
||||
@@ -698,6 +697,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 */
|
||||
|
||||
Reference in New Issue
Block a user