OSDN Git Service

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)
commit0d9388635a22331d39989b96d5830b486d9c8900
treea7c0ebb2884106fb074f790097c7f137ff7a90d2
parent2dfa597d249cbe16962ac142c882b30f7ff385e5
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