drm/i915/ttm: Reorganize the ttm move code somewhat
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 13 Aug 2021 14:43:30 +0000 (16:43 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 25 Aug 2021 14:05:47 +0000 (16:05 +0200)
commitd8ac30fd479cf0f0b37c7f06b06b50c18f57c548
treeccda95e5d44e05bea51a023b0c326dc499a7ea09
parentae4b0eacaffe6b69ace47b224909bf757767d40b
drm/i915/ttm: Reorganize the ttm move code somewhat

In order to make the code a bit more readable and to facilitate
async memcpy moves, reorganize the move code a little. Determine
at an early stage whether to copy or to clear.

v2:
- Don't set up the memcpy iterators unless we are actually going to memcpy.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://lore.kernel.org/r/20210813144331.372957-2-thomas.hellstrom@linux.intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20210813144331.372957-2-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_ttm.c