unstub i915_ttm_memcpy_init() i915_ttm_move_memcpy()
authorjsg <jsg@openbsd.org>
Wed, 20 Mar 2024 03:00:21 +0000 (03:00 +0000)
committerjsg <jsg@openbsd.org>
Wed, 20 Mar 2024 03:00:21 +0000 (03:00 +0000)
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c

index 640719f..b5791c5 100644 (file)
@@ -272,6 +272,7 @@ struct i915_ttm_memcpy_arg {
        bool clear;
        struct i915_refct_sgt *src_rsgt;
        struct i915_refct_sgt *dst_rsgt;
+       bus_space_tag_t memt;
 };
 
 /**
@@ -304,11 +305,8 @@ struct i915_ttm_memcpy_work {
 
 static void i915_ttm_move_memcpy(struct i915_ttm_memcpy_arg *arg)
 {
-       STUB();
-#ifdef notyet
        ttm_move_memcpy(arg->clear, arg->num_pages,
-                       arg->dst_iter, arg->src_iter);
-#endif
+                       arg->dst_iter, arg->src_iter, arg->memt);
 }
 
 static void i915_ttm_memcpy_init(struct i915_ttm_memcpy_arg *arg,
@@ -317,8 +315,6 @@ static void i915_ttm_memcpy_init(struct i915_ttm_memcpy_arg *arg,
                                 struct ttm_tt *dst_ttm,
                                 struct i915_refct_sgt *dst_rsgt)
 {
-       STUB();
-#ifdef notyet
        struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
        struct intel_memory_region *dst_reg, *src_reg;
 
@@ -342,7 +338,8 @@ static void i915_ttm_memcpy_init(struct i915_ttm_memcpy_arg *arg,
        arg->dst_rsgt = i915_refct_sgt_get(dst_rsgt);
        arg->src_rsgt = clear ? NULL :
                i915_ttm_resource_get_st(obj, bo->resource);
-#endif
+
+       arg->memt = bo->bdev->memt;
 }
 
 static void i915_ttm_memcpy_release(struct i915_ttm_memcpy_arg *arg)