diff options
author | Christian König <christian.koenig@amd.com> | 2017-08-03 08:02:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-29 15:28:04 -0400 |
commit | 3f3333f8a0e90ac26f84ed7b0aa344efce695c08 (patch) | |
tree | 5a807843d544d076c90d22ac71d143b1a1bbce50 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 00b5cc83c443dcd351cb2b21055656e007992b54 (diff) |
drm/amdgpu: track evicted page tables v2
Instead of validating all page tables when one was evicted,
track which one needs a validation.
v2: simplify amdgpu_vm_ready as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index ba012933e6aa..d02880640ee7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -160,7 +160,7 @@ void amdgpu_gem_object_close(struct drm_gem_object *obj, | |||
160 | if (bo_va && --bo_va->ref_count == 0) { | 160 | if (bo_va && --bo_va->ref_count == 0) { |
161 | amdgpu_vm_bo_rmv(adev, bo_va); | 161 | amdgpu_vm_bo_rmv(adev, bo_va); |
162 | 162 | ||
163 | if (amdgpu_vm_ready(adev, vm)) { | 163 | if (amdgpu_vm_ready(vm)) { |
164 | struct dma_fence *fence = NULL; | 164 | struct dma_fence *fence = NULL; |
165 | 165 | ||
166 | r = amdgpu_vm_clear_freed(adev, vm, &fence); | 166 | r = amdgpu_vm_clear_freed(adev, vm, &fence); |
@@ -481,10 +481,10 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev, | |||
481 | struct list_head *list, | 481 | struct list_head *list, |
482 | uint32_t operation) | 482 | uint32_t operation) |
483 | { | 483 | { |
484 | int r = -ERESTARTSYS; | 484 | int r; |
485 | 485 | ||
486 | if (!amdgpu_vm_ready(adev, vm)) | 486 | if (!amdgpu_vm_ready(vm)) |
487 | goto error; | 487 | return; |
488 | 488 | ||
489 | r = amdgpu_vm_update_directories(adev, vm); | 489 | r = amdgpu_vm_update_directories(adev, vm); |
490 | if (r) | 490 | if (r) |