]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Make LRC W/A scratch buffer usage consistent
authorMatthew Brost <matthew.brost@intel.com>
Wed, 8 Oct 2025 21:45:05 +0000 (14:45 -0700)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 9 Oct 2025 10:22:22 +0000 (03:22 -0700)
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 <matthew.brost@intel.com>
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20251008214532.3442967-8-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_lrc.c

index 2c6eae2de1f21e8d05c7d7c73b94e32ca338fe54..b5083c99dd500aa33b4df118218e3b02bee5ec2c 100644 (file)
@@ -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,