Skip to content

Commit 95c058c

Browse files
mbrost05Thomas Hellström
authored andcommitted
drm/xe: Assume large page size if VMA not yet bound
The calculation to determine max page size of a VMA during a REMAP operations assumes the VMA has been bound. This assumption is not true if the VMA is from an eariler operation in an array of binds. If a VMA has not been bound use the maximum page size which will ensure the previous / next REMAP operations are not incorrectly skipped. Fixes: 8f33b4f ("drm/xe: Avoid doing rebinds") Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 5ad6af5) Signed-off-by: Thomas Hellström <[email protected]>
1 parent 11572b3 commit 95c058c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,8 +2200,10 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma)
22002200
return SZ_1G;
22012201
else if (vma->gpuva.flags & XE_VMA_PTE_2M)
22022202
return SZ_2M;
2203+
else if (vma->gpuva.flags & XE_VMA_PTE_4K)
2204+
return SZ_4K;
22032205

2204-
return SZ_4K;
2206+
return SZ_1G; /* Uninitialized, used max size */
22052207
}
22062208

22072209
static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size)

0 commit comments

Comments
 (0)