drm/xe: Add migrate layer functions for SVM support
authorMatthew Brost <matthew.brost@intel.com>
Thu, 6 Mar 2025 01:26:45 +0000 (17:26 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 6 Mar 2025 19:35:53 +0000 (11:35 -0800)
commit9c44fd5f6e8aa1ed944f085926044fcbf797206c
treebc2ec488c1989fed326d0b2b70ca779f47a8fb61
parent77613a2e10087b1e613649ecb337c4922900421c
drm/xe: Add migrate layer functions for SVM support

Add functions which migrate to / from VRAM accepting a single DPA
argument (VRAM) and array of dma addresses (SRAM). Used for SVM
migrations.

v2:
 - Don't unlock job_mutex in error path of xe_migrate_vram
v3:
 - Kernel doc (Thomas)
 - Better commit message (Thomas)
 - s/dword/num_dword (Thomas)
 - Return error on to large of migration (Thomas)

Signed-off-by: Oak Zeng <oak.zeng@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250306012657.3505757-21-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_migrate.c
drivers/gpu/drm/xe/xe_migrate.h