[PATCH] drm/xe: Set PTE_AE for xe2 dgfx platforms

Nirmoy Das nirmoy.das at intel.com
Wed Jan 17 14:48:51 UTC 2024


Atomics on XE2 works for both type of memory so
extend setting PTE_AE for dgfx platforms as well.

Cc: Fei Yang <fei.yang at intel.com>
Cc: Jose Souza <jose.souza at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
Cc: Brian Welty <brian.welty at intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
 drivers/gpu/drm/xe/xe_pt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index de1030a47588..3ace4b401369 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -602,8 +602,12 @@ xe_pt_stage_bind(struct xe_tile *tile, struct xe_vma *vma,
 	struct xe_pt *pt = xe_vma_vm(vma)->pt_root[tile->id];
 	int ret;
 
+	/**
+	 * XE_USM_PPGTT_PTE_AE is available for igfx and dgfx from xe2 onwards
+	 * and also for PVC but atomics only works for PVC on device memory.
+	 */
 	if (vma && (vma->gpuva.flags & XE_VMA_ATOMIC_PTE_BIT) &&
-	    (is_devmem || !IS_DGFX(xe)))
+	    (is_devmem || GRAPHICS_VER(xe) >= 20))
 		xe_walk.default_pte |= XE_USM_PPGTT_PTE_AE;
 
 	if (is_devmem) {
-- 
2.42.0



More information about the Intel-xe mailing list