Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe: derive mem copy capability from graphics version

Drop .has_mem_copy_instr from the platform descriptors and set it
in xe_info_init() after handle_gmdid() populates graphics_verx100.
Centralizing the GRAPHICS_VER(xe) >= 20 check keeps MEM_COPY enabled
on Xe2+ and removes redundant per-platform plumbing.

Bspec: 57561

Fixes: 1e12dbae9d72 ("drm/xe/migrate: support MEM_COPY instruction")
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
Link: https://patch.msgid.link/20260120054724.1982608-2-nitin.r.gote@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
(cherry picked from commit 6ef02656c3222b1e12032a40d644ed56806b14fc)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>

authored by

Nitin Gote and committed by
Thomas Hellström
ca8dcfed 051be491

+1 -6
+1 -5
drivers/gpu/drm/xe/xe_pci.c
··· 342 342 .has_display = true, 343 343 .has_flat_ccs = 1, 344 344 .has_pxp = true, 345 - .has_mem_copy_instr = true, 346 345 .max_gt_per_tile = 2, 347 346 .needs_scratch = true, 348 347 .va_bits = 48, ··· 362 363 .has_heci_cscfi = 1, 363 364 .has_late_bind = true, 364 365 .has_sriov = true, 365 - .has_mem_copy_instr = true, 366 366 .max_gt_per_tile = 2, 367 367 .needs_scratch = true, 368 368 .subplatforms = (const struct xe_subplatform_desc[]) { ··· 378 380 .has_display = true, 379 381 .has_flat_ccs = 1, 380 382 .has_sriov = true, 381 - .has_mem_copy_instr = true, 382 383 .max_gt_per_tile = 2, 383 384 .needs_scratch = true, 384 385 .needs_shared_vf_gt_wq = true, ··· 390 393 .dma_mask_size = 46, 391 394 .has_display = true, 392 395 .has_flat_ccs = 1, 393 - .has_mem_copy_instr = true, 394 396 .max_gt_per_tile = 2, 395 397 .require_force_probe = true, 396 398 .va_bits = 48, ··· 671 675 xe->info.has_pxp = desc->has_pxp; 672 676 xe->info.has_sriov = xe_configfs_primary_gt_allowed(to_pci_dev(xe->drm.dev)) && 673 677 desc->has_sriov; 674 - xe->info.has_mem_copy_instr = desc->has_mem_copy_instr; 675 678 xe->info.skip_guc_pc = desc->skip_guc_pc; 676 679 xe->info.skip_mtcfg = desc->skip_mtcfg; 677 680 xe->info.skip_pcode = desc->skip_pcode; ··· 859 864 xe->info.has_range_tlb_inval = graphics_desc->has_range_tlb_inval; 860 865 xe->info.has_usm = graphics_desc->has_usm; 861 866 xe->info.has_64bit_timestamp = graphics_desc->has_64bit_timestamp; 867 + xe->info.has_mem_copy_instr = GRAPHICS_VER(xe) >= 20; 862 868 863 869 xe_info_probe_tile_count(xe); 864 870
-1
drivers/gpu/drm/xe/xe_pci_types.h
··· 46 46 u8 has_late_bind:1; 47 47 u8 has_llc:1; 48 48 u8 has_mbx_power_limits:1; 49 - u8 has_mem_copy_instr:1; 50 49 u8 has_pxp:1; 51 50 u8 has_sriov:1; 52 51 u8 needs_scratch:1;