summaryrefslogtreecommitdiff
path: root/lib/xe/xe_util.h
diff options
context:
space:
mode:
authorZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2025-09-30 16:31:32 +0200
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2025-10-01 13:33:59 +0200
commit12496124431e570139e4744e6b34812dde2961a3 (patch)
tree193de8fc2539f908f2fa44480a065d9dbc21396e /lib/xe/xe_util.h
parent01ac869811457a642d42d80903a45dc15f3c8a78 (diff)
lib/xe_util: Add xe fast-copy helper
In Xe2 and beyond fast-copy between objects with different pat indices is quite common operation. Add fast-copy helper which requires only src/dst bo handle, region, pat index and size of operation. It is however limited to size being multiple of 4KiB and lesser or equal 16MiB but this limitation may removed if there will be user of this. Cc: Matthew Auld <matthew.auld@intel.com> Cc: Nakshtra Goyal <nakshtra.goyal@intel.com> Tested-by: Nakshtra Goyal <nakshtra.goyal@intel.com> Reviewed-by: Nakshtra Goyal <nakshtra.goyal@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://lore.kernel.org/r/20250930143130.186193-5-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Diffstat (limited to 'lib/xe/xe_util.h')
-rw-r--r--lib/xe/xe_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/xe/xe_util.h b/lib/xe/xe_util.h
index 06ebd3c2a..a22572f35 100644
--- a/lib/xe/xe_util.h
+++ b/lib/xe/xe_util.h
@@ -49,4 +49,9 @@ void xe_bind_unbind_async(int fd, uint32_t vm, uint32_t bind_engine,
uint32_t xe_nsec_to_ticks(int fd, int gt_id, uint64_t ns);
+void xe_fast_copy(int fd,
+ uint32_t src_bo, uint32_t src_region, uint8_t src_pat_index,
+ uint32_t dst_bo, uint32_t dst_region, uint8_t dst_pat_index,
+ uint64_t size);
+
#endif /* XE_UTIL_H */