]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm, drm/i915: Update ttm_move_memcpy for async use
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 13 Aug 2021 14:43:31 +0000 (16:43 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 25 Aug 2021 14:05:47 +0000 (16:05 +0200)
commit669076334bfa7915e6856cf49c6408a2ec07df7a
tree63606a28faf8349b92064efee6c867f5c46b45db
parentd8ac30fd479cf0f0b37c7f06b06b50c18f57c548
drm/ttm, drm/i915: Update ttm_move_memcpy for async use

The buffer object argument to ttm_move_memcpy was only used to
determine whether the destination memory should be cleared only
or whether we should copy data. Replace it with a "clear" bool, and
update the callers.

The intention here is to be able to use ttm_move_memcpy() async under
a dma-fence as a fallback if an accelerated blit fails in a security-
critical path where data might leak if the blit is not properly
performed. For that purpose the bo is an unsuitable argument since
its relevant members might already have changed at call time.

Finally, update the ttm_move_memcpy kerneldoc that seems to have
ended up with a stale version.

Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20210813144331.372957-3-thomas.hellstrom@linux.intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20210813144331.372957-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
drivers/gpu/drm/ttm/ttm_bo_util.c
include/drm/ttm/ttm_bo_driver.h