drm/i915/selftests: Prepare mocs tests for obj->mm.lock removal
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 23 Mar 2021 15:50:43 +0000 (16:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Mar 2021 16:44:10 +0000 (17:44 +0100)
Use pin_map_unlocked when we're not holding locks.

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-55-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/gt/selftest_mocs.c

index a539f68d08b9ff27e1e56556f043a123c9075307..f00b9145280617ce77dbd492565eb80246eb6a37 100644 (file)
@@ -80,7 +80,7 @@ static int live_mocs_init(struct live_mocs *arg, struct intel_gt *gt)
        if (IS_ERR(arg->scratch))
                return PTR_ERR(arg->scratch);
 
-       arg->vaddr = i915_gem_object_pin_map(arg->scratch->obj, I915_MAP_WB);
+       arg->vaddr = i915_gem_object_pin_map_unlocked(arg->scratch->obj, I915_MAP_WB);
        if (IS_ERR(arg->vaddr)) {
                err = PTR_ERR(arg->vaddr);
                goto err_scratch;