summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_bo.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-09-27 22:39:00 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:41:20 +0300
commitfcd75139cd3c76467c8495c750fd6e27787f7e37 (patch)
tree51620e4cb7821476e41c3fce409c5c3ce88ff2fa /drivers/gpu/drm/xe/xe_bo.h
parent0d68247efcdbf7791122071323719310207354f3 (diff)
downloadlinux-fcd75139cd3c76467c8495c750fd6e27787f7e37.tar.xz
drm/xe: Use pat_index to encode pde/pte
Change the xelp_pte_encode() and xelp_pde_encode() functions to use the platform-dependent pat_index. The same function can be used for all platforms as they only need to encode the pat_index bits in the same pte/pde layout. For platforms that don't have the most significant bit, as long as they don't return a bogus index they should be fine. v2: Use the same logic to encode pde as it's compatible with previous logic, it's more future proof and also fixes the cache setting for PVC (Matt Roper) Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230927193902.2849159-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.h')
-rw-r--r--drivers/gpu/drm/xe/xe_bo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
index 23f1b9e74e71..5666fd6d7f11 100644
--- a/drivers/gpu/drm/xe/xe_bo.h
+++ b/drivers/gpu/drm/xe/xe_bo.h
@@ -48,10 +48,10 @@
#define XE_BO_INTERNAL_TEST BIT(30)
#define XE_BO_INTERNAL_64K BIT(31)
-#define PPAT_UNCACHED GENMASK_ULL(4, 3)
-#define PPAT_CACHED_PDE 0
-#define PPAT_CACHED BIT_ULL(7)
-#define PPAT_DISPLAY_ELLC BIT_ULL(4)
+#define XELPG_PPGTT_PTE_PAT3 BIT_ULL(62)
+#define XE_PPGTT_PTE_PAT2 BIT_ULL(7)
+#define XE_PPGTT_PTE_PAT1 BIT_ULL(4)
+#define XE_PPGTT_PTE_PAT0 BIT_ULL(3)
#define XE_PTE_SHIFT 12
#define XE_PAGE_SIZE (1 << XE_PTE_SHIFT)