diff options
author | Lucas De Marchi <[email protected]> | 2023-10-06 11:23:23 -0700 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:42:57 -0500 |
commit | 5803bdc8ad6f0320b3147de7e565c24b3afe31fb (patch) | |
tree | 2b6a58c9a066268433e456f1ff7a3794bd39d169 | |
parent | 811aa4d2074a9e64baeaa4bbc2773ead6247f101 (diff) |
drm/xe/xe2: Add one more bit to encode PAT to ppgtt entries
Xe2 adds one more bit to cover all the possible 32 entries. Although
those entries are not used by internal kernel code paths, it's expected
that userspace will make use of it.
Bspec: 59510, 67095
Reviewed-by: Pallavi Mishra <[email protected]>
Reviewed-by: Matt Roper <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h index 5666fd6d7f11..ba6ffd359ff7 100644 --- a/drivers/gpu/drm/xe/xe_bo.h +++ b/drivers/gpu/drm/xe/xe_bo.h @@ -49,6 +49,7 @@ #define XE_BO_INTERNAL_64K BIT(31) #define XELPG_PPGTT_PTE_PAT3 BIT_ULL(62) +#define XE2_PPGTT_PTE_PAT4 BIT_ULL(61) #define XE_PPGTT_PTE_PAT2 BIT_ULL(7) #define XE_PPGTT_PTE_PAT1 BIT_ULL(4) #define XE_PPGTT_PTE_PAT0 BIT_ULL(3) diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index 10ed72228946..665af2646243 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -1242,6 +1242,9 @@ static u64 pte_encode_cache(struct xe_device *xe, enum xe_cache_level cache) if (pat_index & BIT(3)) pte |= XELPG_PPGTT_PTE_PAT3; + if (pat_index & (BIT(4))) + pte |= XE2_PPGTT_PTE_PAT4; + return pte; } |