drm/i915/gem: Introduce a selftest for the gem object migrate functionality
authorMatthew Auld <matthew.auld@intel.com>
Tue, 29 Jun 2021 15:12:02 +0000 (17:12 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 30 Jun 2021 10:32:40 +0000 (11:32 +0100)
commitbf74a18ca8569ff1ac89501026a8218753f757f7
treebea61dbe20d8e2d6035fad6fa5c2a1915f76cca5
parentb6e913e19c54eddd6a4d637969f5c079effb74c6
drm/i915/gem: Introduce a selftest for the gem object migrate functionality

A selftest for the gem object migrate functionality. Slightly adapted
from the original by Matthew to the new interface and new fill blit
code.

v4:
- Initialize buffers and check contents after migration
  (Suggested by Matthew Auld)
- Perform async migration (if implemented) in the igt_lmem_pages_migrate
  test
- Test also migration to the current region.

Co-developed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> #v3
Link: https://patchwork.freedesktop.org/patch/msgid/20210629151203.209465-3-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c [new file with mode: 0644]
drivers/gpu/drm/i915/selftests/i915_live_selftests.h