Commit 0ca229da authored by Matthew Brost's avatar Matthew Brost
Browse files

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: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarTomasz Lis <tomasz.lis@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20251008214532.3442967-8-matthew.brost@intel.com
parent 807c42dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1247,7 +1247,7 @@ static int setup_bo(struct bo_setup_state *state)

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,