diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-05 09:56:53 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-05 13:19:24 +0300 |
commit | 0f17d5dd2199555830482b638a5fc8bf915f2f10 (patch) | |
tree | f3a8e6fe76855055c7f04758dfe924b07b402b13 /drivers/gpu/drm | |
parent | eae4c9445354602926ff7cc4702c2516e2485a94 (diff) | |
download | linux-0f17d5dd2199555830482b638a5fc8bf915f2f10.tar.xz |
drm/i915/selftests: Replace open-coded i915_address_space_init()
Use i915_address_space_init() rather than open-code it inside
mock_ppgtt() as we will forget to keep it in sync.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180705065653.20449-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gtt.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_gtt.c b/drivers/gpu/drm/i915/selftests/mock_gtt.c index 07df5c399ec1..a140ea5c3a7c 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gtt.c +++ b/drivers/gpu/drm/i915/selftests/mock_gtt.c @@ -70,11 +70,7 @@ mock_ppgtt(struct drm_i915_private *i915, ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE); ppgtt->vm.file = ERR_PTR(-ENODEV); - INIT_LIST_HEAD(&ppgtt->vm.active_list); - INIT_LIST_HEAD(&ppgtt->vm.inactive_list); - INIT_LIST_HEAD(&ppgtt->vm.unbound_list); - - drm_mm_init(&ppgtt->vm.mm, 0, ppgtt->vm.total); + i915_address_space_init(&ppgtt->vm, i915); ppgtt->vm.clear_range = nop_clear_range; ppgtt->vm.insert_page = mock_insert_page; |