All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Skip clearing purged page-table BOs
@ 2026-09-04 12:21 Tejas Upadhyay
  2026-09-04 12:29 ` ✓ CI.KUnit: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Tejas Upadhyay @ 2026-09-04 12:21 UTC (permalink / raw)
  To: intel-xe; +Cc: himal.prasad.ghimiray, Matthew Brost, Tejas Upadhyay

VRAM page offlining can clear a page-table BO's vmap before VM teardown
calls xe_pt_clear(). Check for a purged BO under its dma-resv lock before
writing to the mapping.

Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
 drivers/gpu/drm/xe/xe_pt.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 5d990c1c3740..23bc74ba02cb 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -236,9 +236,12 @@ void xe_pt_destroy(struct xe_pt *pt, u32 flags, struct llist_head *deferred)
  */
 void xe_pt_clear(struct xe_device *xe, struct xe_pt *pt)
 {
-	struct iosys_map *map = &pt->bo->vmap;
+	struct xe_bo *bo = pt->bo;
 
-	xe_map_memset(xe, map, 0, 0, SZ_4K);
+	xe_bo_lock(bo, false);
+	if (!xe_bo_is_purged(bo))
+		xe_map_memset(xe, &bo->vmap, 0, 0, SZ_4K);
+	xe_bo_unlock(bo);
 }
 
 /**
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-04 22:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 12:21 [PATCH] drm/xe: Skip clearing purged page-table BOs Tejas Upadhyay
2026-09-04 12:29 ` ✓ CI.KUnit: success for " Patchwork
2026-09-04 12:40 ` [PATCH] " sashiko-bot
2026-09-04 22:54   ` Matthew Brost
2026-09-04 13:03 ` ✗ Xe.CI.BAT: failure for " Patchwork
2026-09-04 17:33 ` [PATCH] " Matthew Brost
2026-09-04 22:10 ` ✓ Xe.CI.FULL: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.