]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2ab3774a897e15e69c7d590b6aac81f9de62cb54
tree0e1dbaf427d0b1170ee977bd621765d1d9b63df6
parent0f139de883b5c36fb431dbcfdddb8cb40d157cb4
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