0001
0002
0003
0004
0005 #ifndef _I915_GEM_TTM_MOVE_H_
0006 #define _I915_GEM_TTM_MOVE_H_
0007
0008 #include <linux/types.h>
0009
0010 #include "i915_selftest.h"
0011
0012 struct ttm_buffer_object;
0013 struct ttm_operation_ctx;
0014 struct ttm_place;
0015 struct ttm_resource;
0016 struct ttm_tt;
0017
0018 struct drm_i915_gem_object;
0019 struct i915_refct_sgt;
0020
0021 int i915_ttm_move_notify(struct ttm_buffer_object *bo);
0022
0023 I915_SELFTEST_DECLARE(void i915_ttm_migrate_set_failure_modes(bool gpu_migration,
0024 bool work_allocation));
0025 I915_SELFTEST_DECLARE(void i915_ttm_migrate_set_ban_memcpy(bool ban));
0026
0027 int i915_gem_obj_copy_ttm(struct drm_i915_gem_object *dst,
0028 struct drm_i915_gem_object *src,
0029 bool allow_accel, bool intr);
0030
0031
0032
0033 int i915_ttm_move(struct ttm_buffer_object *bo, bool evict,
0034 struct ttm_operation_ctx *ctx,
0035 struct ttm_resource *dst_mem,
0036 struct ttm_place *hop);
0037
0038 void i915_ttm_adjust_domains_after_move(struct drm_i915_gem_object *obj);
0039
0040 void i915_ttm_adjust_gem_after_move(struct drm_i915_gem_object *obj);
0041
0042 #endif