1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2020 Intel Corporation 4 */ 5 6 #ifndef __INTEL_MIGRATE__ 7 #define __INTEL_MIGRATE__ 8 9 #include "intel_migrate_types.h" 10 11 struct dma_fence; 12 struct i915_request; 13 struct i915_gem_ww_ctx; 14 struct intel_gt; 15 struct scatterlist; 16 enum i915_cache_level; 17 18 int intel_migrate_init(struct intel_migrate *m, struct intel_gt *gt); 19 20 struct intel_context *intel_migrate_create_context(struct intel_migrate *m); 21 22 int intel_migrate_copy(struct intel_migrate *m, 23 struct i915_gem_ww_ctx *ww, 24 struct dma_fence *await, 25 struct scatterlist *src, 26 enum i915_cache_level src_cache_level, 27 bool src_is_lmem, 28 struct scatterlist *dst, 29 enum i915_cache_level dst_cache_level, 30 bool dst_is_lmem, 31 struct i915_request **out); 32 33 int intel_context_migrate_copy(struct intel_context *ce, 34 struct dma_fence *await, 35 struct scatterlist *src, 36 enum i915_cache_level src_cache_level, 37 bool src_is_lmem, 38 struct scatterlist *dst, 39 enum i915_cache_level dst_cache_level, 40 bool dst_is_lmem, 41 struct i915_request **out); 42 43 void intel_migrate_fini(struct intel_migrate *m); 44 45 #endif /* __INTEL_MIGRATE__ */ 46