]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/ttm: Implement a function to copy the contents of two TTM-based objects
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 22 Sep 2021 06:25:19 +0000 (08:25 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 24 Sep 2021 06:19:09 +0000 (08:19 +0200)
commit76704a0de233bd4327c3d19df50ac4b86f257617
treea7c0ebb2884106fb074f790097c7f137ff7a90d2
parentac4db814d0646b672e03d23e7e152d5673e1d3c0
drm/i915/ttm: Implement a function to copy the contents of two TTM-based objects

When backing up or restoring contents of pinned objects at suspend /
resume time we need to allocate a new object as the backup. Add a function
to facilitate copies between the two. Some data needs to be copied before
the migration context is ready for operation, so make sure we can
disable accelerated copies.

v2:
- Fix a missing return value check (Matthew Auld)

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/20210922062527.865433-2-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
drivers/gpu/drm/i915/gem/i915_gem_ttm.h