drm/xe: Add xe_ttm_access_memory
authorMatthew Brost <matthew.brost@intel.com>
Tue, 26 Nov 2024 17:46:10 +0000 (09:46 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Thu, 28 Nov 2024 00:38:51 +0000 (16:38 -0800)
commit97e8cecb6a0dde7ebb8e8e973146b5a131f52b9f
tree80259b7d99f12007595be528e4e28a45c8bad6f6
parent7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8
drm/xe: Add xe_ttm_access_memory

Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible
VRAM easily be accessed. Add xe_ttm_access_memory which hooks into
ttm_bo_access to access such memory.

v4:
 - Assert memory access rather than taking RPM ref (Thomas / Auld)
 - Fix warning on xe_res_cursor.h for non-zero offset (Mika)

Reported-by: Christoph Manszewski <christoph.manszewski@intel.com>
Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-4-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_bo.c