drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 21 Jan 2019 22:20:49 +0000 (22:20 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Jan 2019 12:50:39 +0000 (12:50 +0000)
commitc95e7ce387f97df6f7e61e08a35f97a8d74e5ee1
tree0e1dbaf427d0b1170ee977bd621765d1d9b63df6
parent480cd6dd9287ac8276c802475bacb3138afd8e04
drm/i915/selftests: Create a clean GGTT for vma/gtt selftesting

Some tests (e.g. igt_vma_pin1) presume that we have a completely clean
GGTT so that it can probe boundaries without fear that something is
already allocated there. However, the mock device is starting to get
complicated and following similar rules to the live device, i.e. we
can't guarantee that i915->ggtt remains clean, so create a temporary
address_space equivalent to the mock ggtt for the purpose.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190121222117.23305-7-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
drivers/gpu/drm/i915/selftests/i915_vma.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c
drivers/gpu/drm/i915/selftests/mock_gtt.c
drivers/gpu/drm/i915/selftests/mock_gtt.h