Commit 19adacce authored by Matthew Brost's avatar Matthew Brost

drm/xe: Fix xe_vma_set_pte_size

xe_vma_set_pte_size had a return value and did not set the 4k VMA flag.
Both of these were incorrect. Fix these.

Fixes: c47794bd ("drm/xe: Set max pte size when skipping rebinds")
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240219211942.3633795-2-matthew.brost@intel.com
parent a0df2cc8
...@@ -2198,7 +2198,7 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma) ...@@ -2198,7 +2198,7 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma)
return SZ_1G; /* Uninitialized, used max size */ 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) { switch (size) {
case SZ_1G: case SZ_1G:
...@@ -2207,9 +2207,10 @@ static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size) ...@@ -2207,9 +2207,10 @@ static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size)
case SZ_2M: case SZ_2M:
vma->gpuva.flags |= XE_VMA_PTE_2M; vma->gpuva.flags |= XE_VMA_PTE_2M;
break; 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) static int xe_vma_op_commit(struct xe_vm *vm, struct xe_vma_op *op)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment