drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 23 Mar 2021 15:50:49 +0000 (16:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Mar 2021 16:46:56 +0000 (17:46 +0100)
commit480ae79537b28f30ef6e07b7de69a9ae2599daa7
tree89efae3c5b370ade558a842bdd1ab5c2a659c201
parentb91e1b11f9fc54ae723e4f75a3d1b40d027cdbd8
drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal

We need to lock the global gtt dma_resv, use i915_vm_lock_objects
to handle this correctly. Add ww handling for this where required.

Add the object lock around unpin/put pages, and use the unlocked
versions of pin_pages and pin_map where required.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-61-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c