Commit 48651e18 authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe: Move PTE/PDE bit definitions to proper header

We already have dedicated header for GGTT/PPGTT definitions.
It's also cleaner to separate them from implementation macros.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240405123520.847-1-michal.wajdeczko@intel.com
parent 788d2ad6
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
/* for ioread64 */ /* for ioread64 */
#include <linux/io-64-nonatomic-lo-hi.h> #include <linux/io-64-nonatomic-lo-hi.h>
#include "regs/xe_gtt_defs.h"
#include "xe_ggtt.h" #include "xe_ggtt.h"
#include "i915_drv.h" #include "i915_drv.h"
......
...@@ -11,4 +11,25 @@ ...@@ -11,4 +11,25 @@
#define GUC_GGTT_TOP 0xFEE00000 #define GUC_GGTT_TOP 0xFEE00000
#define XELPG_PPGTT_PTE_PAT3 BIT_ULL(62)
#define XE2_PPGTT_PTE_PAT4 BIT_ULL(61)
#define XE_PPGTT_PDE_PDPE_PAT2 BIT_ULL(12)
#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_PDE_PS_2M BIT_ULL(7)
#define XE_PDPE_PS_1G BIT_ULL(7)
#define XE_PDE_IPS_64K BIT_ULL(11)
#define XE_GGTT_PTE_DM BIT_ULL(1)
#define XE_USM_PPGTT_PTE_AE BIT_ULL(10)
#define XE_PPGTT_PTE_DM BIT_ULL(11)
#define XE_PDE_64K BIT_ULL(6)
#define XE_PTE_PS64 BIT_ULL(8)
#define XE_PTE_NULL BIT_ULL(9)
#define XE_PAGE_PRESENT BIT_ULL(0)
#define XE_PAGE_RW BIT_ULL(1)
#endif #endif
...@@ -50,13 +50,6 @@ ...@@ -50,13 +50,6 @@
#define XE_BO_FLAG_INTERNAL_TEST BIT(30) #define XE_BO_FLAG_INTERNAL_TEST BIT(30)
#define XE_BO_FLAG_INTERNAL_64K BIT(31) #define XE_BO_FLAG_INTERNAL_64K BIT(31)
#define XELPG_PPGTT_PTE_PAT3 BIT_ULL(62)
#define XE2_PPGTT_PTE_PAT4 BIT_ULL(61)
#define XE_PPGTT_PDE_PDPE_PAT2 BIT_ULL(12)
#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_PTE_SHIFT 12
#define XE_PAGE_SIZE (1 << XE_PTE_SHIFT) #define XE_PAGE_SIZE (1 << XE_PTE_SHIFT)
#define XE_PTE_MASK (XE_PAGE_SIZE - 1) #define XE_PTE_MASK (XE_PAGE_SIZE - 1)
...@@ -69,20 +62,6 @@ ...@@ -69,20 +62,6 @@
#define XE_64K_PTE_MASK (XE_64K_PAGE_SIZE - 1) #define XE_64K_PTE_MASK (XE_64K_PAGE_SIZE - 1)
#define XE_64K_PDE_MASK (XE_PDE_MASK >> 4) #define XE_64K_PDE_MASK (XE_PDE_MASK >> 4)
#define XE_PDE_PS_2M BIT_ULL(7)
#define XE_PDPE_PS_1G BIT_ULL(7)
#define XE_PDE_IPS_64K BIT_ULL(11)
#define XE_GGTT_PTE_DM BIT_ULL(1)
#define XE_USM_PPGTT_PTE_AE BIT_ULL(10)
#define XE_PPGTT_PTE_DM BIT_ULL(11)
#define XE_PDE_64K BIT_ULL(6)
#define XE_PTE_PS64 BIT_ULL(8)
#define XE_PTE_NULL BIT_ULL(9)
#define XE_PAGE_PRESENT BIT_ULL(0)
#define XE_PAGE_RW BIT_ULL(1)
#define XE_PL_SYSTEM TTM_PL_SYSTEM #define XE_PL_SYSTEM TTM_PL_SYSTEM
#define XE_PL_TT TTM_PL_TT #define XE_PL_TT TTM_PL_TT
#define XE_PL_VRAM0 TTM_PL_VRAM #define XE_PL_VRAM0 TTM_PL_VRAM
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "instructions/xe_mi_commands.h" #include "instructions/xe_mi_commands.h"
#include "regs/xe_gpu_commands.h" #include "regs/xe_gpu_commands.h"
#include "regs/xe_gtt_defs.h"
#include "tests/xe_test.h" #include "tests/xe_test.h"
#include "xe_assert.h" #include "xe_assert.h"
#include "xe_bb.h" #include "xe_bb.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "xe_pt.h" #include "xe_pt.h"
#include "regs/xe_gtt_defs.h"
#include "xe_bo.h" #include "xe_bo.h"
#include "xe_device.h" #include "xe_device.h"
#include "xe_drm_client.h" #include "xe_drm_client.h"
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <generated/xe_wa_oob.h> #include <generated/xe_wa_oob.h>
#include "regs/xe_gtt_defs.h"
#include "xe_assert.h" #include "xe_assert.h"
#include "xe_bo.h" #include "xe_bo.h"
#include "xe_device.h" #include "xe_device.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment