[CI] drm/xe: Don't skip compact PT entry remap
Matthew Brost
matthew.brost at intel.com
Sat Feb 17 06:03:13 UTC 2024
Signed-off-by: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_pt.c | 1 +
drivers/gpu/drm/xe/xe_vm.c | 9 +++++----
drivers/gpu/drm/xe/xe_vm_types.h | 1 +
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 1e35c7525447..48d276d01a2d 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -554,6 +554,7 @@ xe_pt_stage_bind_entry(struct xe_ptw *parent, pgoff_t offset,
walk->shifts = xe_compact_pt_shifts;
flags |= XE_PDE_64K;
xe_child->is_compact = true;
+ xe_walk->vma->gpuva.flags |= XE_VMA_PTE_COMPACT;
}
pte = vm->pt_ops->pde_encode_bo(xe_child->bo, 0, pat_index) | flags;
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 836a6e849cda..f1e77c8c5d7a 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2188,7 +2188,7 @@ static struct xe_vma *new_vma(struct xe_vm *vm, struct drm_gpuva_op_map *op,
static u64 xe_vma_max_pte_size(struct xe_vma *vma)
{
- if (vma->gpuva.flags & XE_VMA_PTE_1G)
+ if (vma->gpuva.flags & (XE_VMA_PTE_1G | XE_VMA_PTE_COMPACT))
return SZ_1G;
else if (vma->gpuva.flags & XE_VMA_PTE_2M)
return SZ_2M;
@@ -2198,7 +2198,7 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma)
return SZ_1G; /* Uninitialized, used max size */
}
-static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size)
+static void xe_vma_set_pte_size(struct xe_vma *vma, u64 size)
{
switch (size) {
case SZ_1G:
@@ -2207,9 +2207,10 @@ static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size)
case SZ_2M:
vma->gpuva.flags |= XE_VMA_PTE_2M;
break;
+ case SZ_4K:
+ vma->gpuva.flags |= XE_VMA_PTE_4K;
+ break;
}
-
- return SZ_4K;
}
static int xe_vma_op_commit(struct xe_vm *vm, struct xe_vma_op *op)
diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
index 5ac9c5bebabc..97847459a235 100644
--- a/drivers/gpu/drm/xe/xe_vm_types.h
+++ b/drivers/gpu/drm/xe/xe_vm_types.h
@@ -29,6 +29,7 @@ struct xe_vm;
#define XE_VMA_PTE_4K (DRM_GPUVA_USERBITS << 5)
#define XE_VMA_PTE_2M (DRM_GPUVA_USERBITS << 6)
#define XE_VMA_PTE_1G (DRM_GPUVA_USERBITS << 7)
+#define XE_VMA_PTE_COMPACT (DRM_GPUVA_USERBITS << 8)
/** struct xe_userptr - User pointer */
struct xe_userptr {
--
2.34.1
More information about the Intel-xe
mailing list