aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2024-02-05 15:17:14 -0800
committerThomas Hellström <thomas.hellstrom@linux.intel.com>2024-02-08 09:50:50 +0100
commit95c058c8ef1d5d9e39ab2039a5eea4d5b93f4117 (patch)
tree558313e250f0074288783b7784bb9c2f08bcc7fe
parent11572b3f68d9933fef5c1afef4c20041701d8025 (diff)
downloadlinux-sparc-95c058c8ef1d5d9e39ab2039a5eea4d5b93f4117.tar.gz
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: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240205231714.2956225-1-matthew.brost@intel.com (cherry picked from commit 5ad6af5c91e9b942c44b657122270d935db3a813) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
-rw-r--r--drivers/gpu/drm/xe/xe_vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index ca11f83811155..99f151d73154a 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -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_4K;
+ return SZ_1G; /* Uninitialized, used max size */
}
static u64 xe_vma_set_pte_size(struct xe_vma *vma, u64 size)