Skip to content

Commit 7657d7c

Browse files
committed
drm/xe/migrate: Future-proof compressed PAT check
Although all current Xe2 platforms support FlatCCS, we probably shouldn't assume that will be universally true forever. In the past we've had platforms like PVC that didn't support compression, and the same could show up again at some point in the future. Future-proof the migration code by adding an explicit check for FlatCCS support to the condition that decides whether to use a compressed PAT index for migration. While we're at it, we can drop the IS_DGFX check since it's redundant with the src_is_vram check (only dGPUs have VRAM). Cc: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Cc: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Akshata Jahagirdar <akshata.jahagirdar@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240726171757.2728819-2-matthew.d.roper@intel.com
1 parent fd6797e commit 7657d7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/xe/xe_migrate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,8 @@ struct dma_fence *xe_migrate_copy(struct xe_migrate *m,
781781
bool copy_ccs = xe_device_has_flat_ccs(xe) &&
782782
xe_bo_needs_ccs_pages(src_bo) && xe_bo_needs_ccs_pages(dst_bo);
783783
bool copy_system_ccs = copy_ccs && (!src_is_vram || !dst_is_vram);
784-
bool use_comp_pat = GRAPHICS_VER(xe) >= 20 && IS_DGFX(xe) && src_is_vram && !dst_is_vram;
784+
bool use_comp_pat = xe_device_has_flat_ccs(xe) &&
785+
GRAPHICS_VER(xe) >= 20 && src_is_vram && !dst_is_vram;
785786

786787
/* Copying CCS between two different BOs is not supported yet. */
787788
if (XE_WARN_ON(copy_ccs && src_bo != dst_bo))

0 commit comments

Comments
 (0)