Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/pt: Warn on 0 level before going to next lower level
@ 2024-03-18 17:37 Nirmoy Das
  2024-03-18 20:41 ` Rodrigo Vivi
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Nirmoy Das @ 2024-03-18 17:37 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das, Matthew Auld

This should happen so add a warn_on to be more paranoid.

Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/xe/xe_pt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 7f54bc3e389d..d6794f65d6c1 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -731,6 +731,7 @@ static int xe_pt_zap_ptes_entry(struct xe_ptw *parent, pgoff_t offset,
 	pgoff_t end_offset;
 
 	XE_WARN_ON(!*child);
+	XE_WARN_ON(!level);
 	XE_WARN_ON(!level && xe_child->is_compact);
 
 	/*
@@ -1396,6 +1397,7 @@ static int xe_pt_stage_unbind_entry(struct xe_ptw *parent, pgoff_t offset,
 	struct xe_pt *xe_child = container_of(*child, typeof(*xe_child), base);
 
 	XE_WARN_ON(!*child);
+	XE_WARN_ON(!level);
 	XE_WARN_ON(!level && xe_child->is_compact);
 
 	xe_pt_check_kill(addr, next, level - 1, xe_child, action, walk);
-- 
2.42.0


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

end of thread, other threads:[~2024-03-19  9:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 17:37 [PATCH] drm/xe/pt: Warn on 0 level before going to next lower level Nirmoy Das
2024-03-18 20:41 ` Rodrigo Vivi
2024-03-19  9:25   ` Matthew Auld
2024-03-19  9:36     ` Nirmoy Das
2024-03-18 23:31 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-18 23:31 ` ✓ CI.checkpatch: " Patchwork
2024-03-18 23:32 ` ✓ CI.KUnit: " Patchwork
2024-03-18 23:43 ` ✓ CI.Build: " Patchwork
2024-03-18 23:45 ` ✓ CI.Hooks: " Patchwork
2024-03-18 23:47 ` ✓ CI.checksparse: " Patchwork
2024-03-19  0:08 ` ✓ CI.BAT: " Patchwork

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