summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-08-06 12:05:30 +0300
committerAlex Deucher <alexander.deucher@amd.com>2018-08-27 19:11:21 +0300
commit9a2779528eddacf0123bfd7308b71141b54cc619 (patch)
treeefb7596bcfa08db39c788758c1402d27898598cc /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent8c7655a0fdd32ab39cfef604403dbe1013df213b (diff)
downloadlinux-9a2779528eddacf0123bfd7308b71141b54cc619.tar.xz
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 <christian.koenig@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Tested-by: Mike Lothian <mike@fireburn.co.uk> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Acked-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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);