diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c index 0e03328a564d..010499766fce 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine.c +++ b/drivers/gpu/drm/xe/xe_hw_engine.c @@ -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 */