diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-06 05:05:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 12:11:21 -0400 |
commit | 9a2779528eddacf0123bfd7308b71141b54cc619 (patch) | |
tree | efb7596bcfa08db39c788758c1402d27898598cc /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 8c7655a0fdd32ab39cfef604403dbe1013df213b (diff) |
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.c | 8 |
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, | |||
297 | 297 | ||
298 | if (bo->parent) { | 298 | if (bo->parent) { |
299 | spin_lock(&glob->lru_lock); | 299 | spin_lock(&glob->lru_lock); |
300 | ttm_bo_move_to_lru_tail(&bo->tbo); | 300 | ttm_bo_move_to_lru_tail(&bo->tbo, NULL); |
301 | if (bo->shadow) | 301 | if (bo->shadow) |
302 | ttm_bo_move_to_lru_tail(&bo->shadow->tbo); | 302 | ttm_bo_move_to_lru_tail(&bo->shadow->tbo, NULL); |
303 | spin_unlock(&glob->lru_lock); | 303 | spin_unlock(&glob->lru_lock); |
304 | } | 304 | } |
305 | 305 | ||
@@ -319,9 +319,9 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
319 | if (!bo->parent) | 319 | if (!bo->parent) |
320 | continue; | 320 | continue; |
321 | 321 | ||
322 | ttm_bo_move_to_lru_tail(&bo->tbo); | 322 | ttm_bo_move_to_lru_tail(&bo->tbo, NULL); |
323 | if (bo->shadow) | 323 | if (bo->shadow) |
324 | ttm_bo_move_to_lru_tail(&bo->shadow->tbo); | 324 | ttm_bo_move_to_lru_tail(&bo->shadow->tbo, NULL); |
325 | } | 325 | } |
326 | spin_unlock(&glob->lru_lock); | 326 | spin_unlock(&glob->lru_lock); |
327 | 327 | ||