aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-04 12:55:39 +1000
committerDave Airlie <airlied@redhat.com>2020-08-06 12:16:33 +1000
commit20784cdf4b8c81359289aff73a89f557c7bc9e76 (patch)
treeff950470260392f77f3cf10db39664cf2ddd33d4 /drivers/gpu/drm/ttm/ttm_bo_vm.c
parentdrm/ttm/amdgpu: consolidate ttm reserve paths (diff)
downloadlinux-dev-20784cdf4b8c81359289aff73a89f557c7bc9e76.tar.xz
linux-dev-20784cdf4b8c81359289aff73a89f557c7bc9e76.zip
drm/ttm: use a helper for unlocked moves to the lru tail
The pattern was repeated a few times, just make an inline for it. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-7-airlied@gmail.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_vm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 82b893d4249f..1e2820b06c6a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -306,9 +306,7 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf,
}
if (bo->moving != moving) {
- spin_lock(&ttm_bo_glob.lru_lock);
- ttm_bo_move_to_lru_tail(bo, NULL);
- spin_unlock(&ttm_bo_glob.lru_lock);
+ ttm_bo_move_to_lru_tail_unlocked(bo);
}
dma_fence_put(moving);
}