drm/i915/selftests: Rework context handling in hugepages selftests
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 28 Oct 2021 12:58:53 +0000 (13:58 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Fri, 5 Nov 2021 09:22:45 +0000 (09:22 +0000)
commitc10a652e239e21492525fab295dc2fc303338ef1
tree949339d729633901999d38e291a835c6e068c0ac
parent52a743f1c114727cfd51aefe584c7a4d82375acc
drm/i915/selftests: Rework context handling in hugepages selftests

In the next commit, we don't evict when refcount = 0, so we need to
call drain freed objects, because we want to pin new bo's in the same
place, causing a test failure.

Furthermore, since each subtest is separated, it's a lot better to use
i915_live_selftests, so each subtest starts with a clean slate, and a
clean address space.

v2(Reported-by: kernel test robot <lkp@intel.com>):
  - Make hugepage_ctx static.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211028125855.3281674-9-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/selftests/huge_pages.c