drm/xe: Return 2MB page size for compact 64k PTEs
authorMatthew Brost <matthew.brost@intel.com>
Mon, 19 Feb 2024 21:19:42 +0000 (13:19 -0800)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 21 Feb 2024 09:29:45 +0000 (10:29 +0100)
commit5b672ec3f5e15062b76d280f8a4df15e763f6abe
tree037bcff9acb70e6a9037b47178b302a0cded1d7c
parent4cf8ffeb6625b7afd97b8d6698f1887071335c32
drm/xe: Return 2MB page size for compact 64k PTEs

Compact 64k PTEs are only intended to be used within a single VMA which
covers the entire 2MB range of the compact 64k PTEs. Add
XE_VMA_PTE_COMPACT VMA flag to indicate compact 64k PTEs are used and
update xe_vma_max_pte_size to return at least 2MB if set.

v2: Include missing changes

Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds")
Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds")
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/758
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240219211942.3633795-4-matthew.brost@intel.com
(cherry picked from commit 0f688c0eb63a643ef0568b29b12cefbb23181e1a)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_types.h