drm/xe/migrate: fix copy direction in access_memory
authorMatthew Auld <matthew.auld@intel.com>
Thu, 10 Jul 2025 13:41:29 +0000 (14:41 +0100)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 17 Jul 2025 12:45:19 +0000 (09:45 -0300)
commit1381c231c1267480f721b06528c3a230f43f2ac5
tree54294acace763a1ec26766278890069aee75514f
parentfd25fa90edcfd4db5bf69c11621021a7cfd11d53
drm/xe/migrate: fix copy direction in access_memory

After we do the modification on the host side, ensure we write the
result back to VRAM and not the other way around, otherwise the
modification will be lost if treated like a read.

Fixes: 270172f64b11 ("drm/xe: Update xe_ttm_access_memory to use GPU for non-visible access")
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250710134128.800756-2-matthew.auld@intel.com
(cherry picked from commit c12fe703cab93f9d8bfe0ff32b58e7b1fd52be1f)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_migrate.c