Commit 5ad6af5c authored by Matthew Brost's avatar Matthew Brost
Browse files

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: 8f33b4f0 ("drm/xe: Avoid doing rebinds")
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240205231714.2956225-1-matthew.brost@intel.com
parent 17ffcdb0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2200,8 +2200,10 @@ static u64 xe_vma_max_pte_size(struct xe_vma *vma)
		return SZ_1G;
	else if (vma->gpuva.flags & XE_VMA_PTE_2M)
		return SZ_2M;

	else if (vma->gpuva.flags & XE_VMA_PTE_4K)
		return SZ_4K;

	return SZ_1G;	/* Uninitialized, used max size */
}

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