summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pt.h
diff options
context:
space:
mode:
authorThomas Hellström <thomas.hellstrom@linux.intel.com>2023-12-09 18:18:41 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:45:28 +0300
commite84d716dd461928b3db344748cd7f87395a2ce74 (patch)
treec99957778fd6826c9af40d5f1e181e36b19f4562 /drivers/gpu/drm/xe/xe_pt.h
parent1c8e9019033728093c04608f44c6e87fec6822e1 (diff)
downloadlinux-e84d716dd461928b3db344748cd7f87395a2ce74.tar.xz
drm/xe: Restrict huge PTEs to 1GiB
Add a define for the highest level for which we can encode a huge PTE, and use it for page-table building. Also update an assert that checks that we don't try to encode for larger sizes. Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231209151843.7903-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pt.h')
-rw-r--r--drivers/gpu/drm/xe/xe_pt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_pt.h b/drivers/gpu/drm/xe/xe_pt.h
index d5460e58dbbf..ba2f3325c84d 100644
--- a/drivers/gpu/drm/xe/xe_pt.h
+++ b/drivers/gpu/drm/xe/xe_pt.h
@@ -18,6 +18,9 @@ struct xe_tile;
struct xe_vm;
struct xe_vma;
+/* Largest huge pte is currently 1GiB. May become device dependent. */
+#define MAX_HUGEPTE_LEVEL 2
+
#define xe_pt_write(xe, map, idx, data) \
xe_map_wr(xe, map, (idx) * sizeof(u64), u64, data)