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_cs.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_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index d6ddd5562c16..8bf178a912f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -636,9 +636,6 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
636 | 636 | ||
637 | amdgpu_cs_report_moved_bytes(p->adev, p->bytes_moved, | 637 | amdgpu_cs_report_moved_bytes(p->adev, p->bytes_moved, |
638 | p->bytes_moved_vis); | 638 | p->bytes_moved_vis); |
639 | fpriv->vm.last_eviction_counter = | ||
640 | atomic64_read(&p->adev->num_evictions); | ||
641 | |||
642 | if (p->bo_list) { | 639 | if (p->bo_list) { |
643 | struct amdgpu_bo *gds = p->bo_list->gds_obj; | 640 | struct amdgpu_bo *gds = p->bo_list->gds_obj; |
644 | struct amdgpu_bo *gws = p->bo_list->gws_obj; | 641 | struct amdgpu_bo *gws = p->bo_list->gws_obj; |
@@ -835,7 +832,7 @@ static int amdgpu_bo_vm_update_pte(struct amdgpu_cs_parser *p) | |||
835 | if (!bo) | 832 | if (!bo) |
836 | continue; | 833 | continue; |
837 | 834 | ||
838 | amdgpu_vm_bo_invalidate(adev, bo); | 835 | amdgpu_vm_bo_invalidate(adev, bo, false); |
839 | } | 836 | } |
840 | } | 837 | } |
841 | 838 | ||
@@ -860,7 +857,7 @@ static int amdgpu_cs_ib_vm_chunk(struct amdgpu_device *adev, | |||
860 | } | 857 | } |
861 | 858 | ||
862 | if (p->job->vm) { | 859 | if (p->job->vm) { |
863 | p->job->vm_pd_addr = amdgpu_bo_gpu_offset(vm->root.bo); | 860 | p->job->vm_pd_addr = amdgpu_bo_gpu_offset(vm->root.base.bo); |
864 | 861 | ||
865 | r = amdgpu_bo_vm_update_pte(p); | 862 | r = amdgpu_bo_vm_update_pte(p); |
866 | if (r) | 863 | if (r) |