From 0ca229da92bf29b59410d9fae77e5f304df6ab6b Mon Sep 17 00:00:00 2001 From: Matthew Brost Date: Wed, 8 Oct 2025 14:45:05 -0700 Subject: [PATCH] drm/xe: Make LRC W/A scratch buffer usage consistent The LRC W/A currently checks for LRC being iomem in some places, while in others it checks if the scratch buffer is non-NULL. This inconsistency causes issues with the VF post-migration recovery code, which blindly passes in a scratch buffer. This patch standardizes the check by consistently verifying whether the LRC is iomem to determine if the scratch buffer should be used. Signed-off-by: Matthew Brost Reviewed-by: Tomasz Lis Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20251008214532.3442967-8-matthew.brost@intel.com --- drivers/gpu/drm/xe/xe_lrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c index 2c6eae2de1f21..b5083c99dd500 100644 --- a/drivers/gpu/drm/xe/xe_lrc.c +++ b/drivers/gpu/drm/xe/xe_lrc.c @@ -1247,7 +1247,7 @@ fail: static void finish_bo(struct bo_setup_state *state) { - if (!state->buffer) + if (!state->lrc->bo->vmap.is_iomem) return; xe_map_memcpy_to(gt_to_xe(state->lrc->gt), &state->lrc->bo->vmap, -- 2.47.3