Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/xe: Skip over non leaf pte for PRL generation
@ 2026-01-29  8:27 Brian Nguyen
  2026-01-29  8:27 ` [PATCH 2/2] drm/xe: Move page reclaim done_handler to own func Brian Nguyen
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Brian Nguyen @ 2026-01-29  8:27 UTC (permalink / raw)
  To: intel-xe; +Cc: matthew.d.roper, Brian Nguyen

The check using xe_child->base.children was insufficient in determining
if a pte was a leaf node. So explicitly check for if a pte is a leaf
through the bit checks.

Fixes: b912138df299 ("drm/xe: Create page reclaim list on unbind")

v2:
 - Remove old assert. (Matt R)

Signed-off-by: Brian Nguyen <brian3.nguyen@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/xe/xe_pt.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 6703a7049227..b73a356d0fa1 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -1655,7 +1655,7 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset,
 
 	XE_WARN_ON(!*child);
 	XE_WARN_ON(!level);
-	/* Check for leaf node */
+	/* Optimistically check for leaf node, may not be guaranteed from children alone */
 	if (xe_walk->prl && xe_page_reclaim_list_valid(xe_walk->prl) &&
 	    (!xe_child->base.children || !xe_child->base.children[first])) {
 		struct iosys_map *leaf_map = &xe_child->bo->vmap;
@@ -1675,10 +1675,13 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset,
 				break;
 			}
 
-			/* Ensure it is a defined page */
-			xe_tile_assert(xe_walk->tile,
-				       xe_child->level == 0 ||
-				       (pte & (XE_PTE_PS64 | XE_PDE_PS_2M | XE_PDPE_PS_1G)));
+			/*
+			 * The check for xe_pt's children is insufficient to determine leaf.
+			 * If not leaf, break out and continue in next page walk level.
+			 */
+			if (xe_child->level > 0 &&
+			    !(pte & (XE_PTE_PS64 | XE_PDE_PS_2M | XE_PDPE_PS_1G)))
+				break;
 
 			/* An entry should be added for 64KB but contigious 4K have XE_PTE_PS64 */
 			if (pte & XE_PTE_PS64)
-- 
2.43.0


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

end of thread, other threads:[~2026-02-25  7:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29  8:27 [PATCH 1/2] drm/xe: Skip over non leaf pte for PRL generation Brian Nguyen
2026-01-29  8:27 ` [PATCH 2/2] drm/xe: Move page reclaim done_handler to own func Brian Nguyen
2026-01-29 21:40   ` Lin, Shuicheng
2026-02-23 22:45   ` Summers, Stuart
2026-02-23 22:51   ` Matthew Brost
2026-01-29  9:14 ` ✓ CI.KUnit: success for series starting with [1/2] drm/xe: Skip over non leaf pte for PRL generation Patchwork
2026-01-29  9:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-23 21:48 ` [PATCH 1/2] " Nguyen, Brian3
2026-02-23 22:49 ` Summers, Stuart
2026-02-23 22:59   ` Matthew Brost
2026-02-23 23:07     ` Summers, Stuart
2026-02-23 23:33       ` Nguyen, Brian3
2026-02-24  1:45         ` Matthew Brost
2026-02-24  2:02           ` Matthew Brost
2026-02-25  6:45             ` Nguyen, Brian3
2026-02-25  7:19               ` Matthew Brost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox