Since the gt migration code was using only a single fence for dependencies, these were collected in a dma_fence_array. However, it turns out that it's illegal to use some dma_fences in a dma_fence_array, in particular other dma_fence_arrays and dma_fence_chains, and this causes trouble for us moving forward. Have the gt migration code instead take a const struct i915_deps for dependencies. This means we can skip the dma_fence_array creation and instead pass the struct i915_deps instead to circumvent the problem. v2: - Make the prev_deps() function static. (kernel test robot <lkp@intel.com>) - Update the struct i915_deps kerneldoc. v4: - Rebase. Fixes: 5652df829b3c ("drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous") Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211221200050.436316-2-thomas.hellstrom@linux.intel.com
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2020 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_MIGRATE__
|
|
#define __INTEL_MIGRATE__
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include "intel_migrate_types.h"
|
|
|
|
struct dma_fence;
|
|
struct i915_deps;
|
|
struct i915_request;
|
|
struct i915_gem_ww_ctx;
|
|
struct intel_gt;
|
|
struct scatterlist;
|
|
enum i915_cache_level;
|
|
|
|
int intel_migrate_init(struct intel_migrate *m, struct intel_gt *gt);
|
|
|
|
struct intel_context *intel_migrate_create_context(struct intel_migrate *m);
|
|
|
|
int intel_migrate_copy(struct intel_migrate *m,
|
|
struct i915_gem_ww_ctx *ww,
|
|
const struct i915_deps *deps,
|
|
struct scatterlist *src,
|
|
enum i915_cache_level src_cache_level,
|
|
bool src_is_lmem,
|
|
struct scatterlist *dst,
|
|
enum i915_cache_level dst_cache_level,
|
|
bool dst_is_lmem,
|
|
struct i915_request **out);
|
|
|
|
int intel_context_migrate_copy(struct intel_context *ce,
|
|
const struct i915_deps *deps,
|
|
struct scatterlist *src,
|
|
enum i915_cache_level src_cache_level,
|
|
bool src_is_lmem,
|
|
struct scatterlist *dst,
|
|
enum i915_cache_level dst_cache_level,
|
|
bool dst_is_lmem,
|
|
struct i915_request **out);
|
|
|
|
int
|
|
intel_migrate_clear(struct intel_migrate *m,
|
|
struct i915_gem_ww_ctx *ww,
|
|
const struct i915_deps *deps,
|
|
struct scatterlist *sg,
|
|
enum i915_cache_level cache_level,
|
|
bool is_lmem,
|
|
u32 value,
|
|
struct i915_request **out);
|
|
int
|
|
intel_context_migrate_clear(struct intel_context *ce,
|
|
const struct i915_deps *deps,
|
|
struct scatterlist *sg,
|
|
enum i915_cache_level cache_level,
|
|
bool is_lmem,
|
|
u32 value,
|
|
struct i915_request **out);
|
|
|
|
void intel_migrate_fini(struct intel_migrate *m);
|
|
|
|
#endif /* __INTEL_MIGRATE__ */
|