]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Avoid using the i915_fence_array when collecting dependencies
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Tue, 21 Dec 2021 20:00:47 +0000 (21:00 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 22 Dec 2021 07:14:30 +0000 (08:14 +0100)
commitdf5103aa5bb98e25dfc68ae1a167094354f3d831
tree0d6ca46d2ff59c973a50bf2ae2e1fbe14dfb3ea6
parent34d16459f728b317136d82d9bc1dd1164acd5482
drm/i915: Avoid using the i915_fence_array when collecting dependencies

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: 967caf43d2ca ("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
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
drivers/gpu/drm/i915/gem/i915_gem_ttm_move.h
drivers/gpu/drm/i915/gt/intel_migrate.c
drivers/gpu/drm/i915/gt/intel_migrate.h
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h