aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2018-08-06 09:05:30 +0000
committerAlex Deucher <[email protected]>2018-08-27 16:11:21 +0000
commit9a2779528eddacf0123bfd7308b71141b54cc619 (patch)
treeefb7596bcfa08db39c788758c1402d27898598cc /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentdrm/ttm: add helper structures for bulk moves on lru list (diff)
downloadkernel-9a2779528eddacf0123bfd7308b71141b54cc619.tar.gz
kernel-9a2779528eddacf0123bfd7308b71141b54cc619.zip
drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves
When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Tested-by: Mike Lothian <[email protected]> Tested-by: Dieter Nützel <[email protected]> Acked-by: Chunming Zhou <[email protected]> Reviewed-by: Junwei Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 7d7d7e532246..d12bffa5f70c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -297,9 +297,9 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (bo->parent) {
spin_lock(&glob->lru_lock);
- ttm_bo_move_to_lru_tail(&bo->tbo);
+ ttm_bo_move_to_lru_tail(&bo->tbo, NULL);
if (bo->shadow)
- ttm_bo_move_to_lru_tail(&bo->shadow->tbo);
+ ttm_bo_move_to_lru_tail(&bo->shadow->tbo, NULL);
spin_unlock(&glob->lru_lock);
}
@@ -319,9 +319,9 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (!bo->parent)
continue;
- ttm_bo_move_to_lru_tail(&bo->tbo);
+ ttm_bo_move_to_lru_tail(&bo->tbo, NULL);
if (bo->shadow)
- ttm_bo_move_to_lru_tail(&bo->shadow->tbo);
+ ttm_bo_move_to_lru_tail(&bo->shadow->tbo, NULL);
}
spin_unlock(&glob->lru_lock);