drm/i915/selftests: exercise mmap migration
authorMatthew Auld <matthew.auld@intel.com>
Mon, 28 Feb 2022 12:36:07 +0000 (12:36 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 1 Mar 2022 08:50:48 +0000 (08:50 +0000)
commitfb87550d2517878ebcd112f080865a2dc38e9bae
tree9cad550282717fb2a7d383fb6761021a5f85f366
parent6e0c5bf0cc1369df0057bccb3fc1af3b38d07e32
drm/i915/selftests: exercise mmap migration

Exercise each of the migration scenarios, verifying that the final
placement and buffer contents match our expectations.

v2(Thomas): Replace for_i915_gem_ww() block with simpler object_lock()

v3:
- For testing purposes allow forcing the io_size such that we can
  exercise the allocation + migration path on devices that don't have the
  small BAR limit.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220228123607.580432-4-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
drivers/gpu/drm/i915/i915_ttm_buddy_manager.h