From 2a407bc3aba6c57f3f4a88c5c2746411fad681bb Mon Sep 17 00:00:00 2001 From: Shuicheng Lin Date: Thu, 16 Oct 2025 22:55:07 +0000 Subject: [PATCH] drm/xe: Fix stolen size check to allow equal WOPCM size On some platforms without dedicated stolen memory, the calculated stolen size may be exactly equal to the WOPCM size. The current assertion incorrectly requires it to be strictly greater, causing a false failure. Relax the check to allow equality. Fixes: 65369b8e2961 ("drm/xe: Change return type of detect_bar2_dgfx() from s64 to u64") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6359 Cc: Matthew Auld Cc: Rodrigo Vivi Signed-off-by: Shuicheng Lin Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20251016225506.2256127-2-shuicheng.lin@intel.com Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c index e368b2a36bace..1bddecfb723a4 100644 --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c @@ -106,7 +106,7 @@ static u64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr) stolen_size = tile_size - mgr->stolen_base; - xe_assert(xe, stolen_size > wopcm_size); + xe_assert(xe, stolen_size >= wopcm_size); stolen_size -= wopcm_size; /* Verify usage fits in the actual resource available */ -- 2.47.3